Skip to content

Extensions: adjust logic related to primary ctor parameter #79056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Jun 19, 2025

Addresses parts of #78968
Relates to test plan #76130

@jcouv jcouv self-assigned this Jun 19, 2025
@jcouv jcouv added Area-Compilers Feature - Extension Everything The extension everything feature labels Jun 19, 2025
@jcouv jcouv force-pushed the extensions-primaryctor branch from 9ca772e to a0163cf Compare June 19, 2025 18:53
@@ -1511,62 +1469,138 @@ private BoundMethodOrPropertyGroup ConstructBoundMemberGroupAndReportOmittedType
}
}

private bool IsPossiblyCapturingPrimaryConstructorParameterReference(BoundExpression colorColorValueReceiver, out ParameterSymbol parameterSymbol)
private BoundExpression CheckAmbiguousPrimaryConstructorParameterAsColorColorReceiver(BoundExpression receiver, string plainName, ImmutableArray<TypeWithAnnotations> typeArguments, bool invoked, ArrayBuilder<Symbol> members, BindingDiagnosticBag diagnostics)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 extracted the logic and moved the check out of ConstructBoundMemberGroupAndReportOmittedTypeArguments (the caller is responsible to call CheckAmbiguousPrimaryConstructorParameterAsColorColorReceiver)

@jcouv jcouv force-pushed the extensions-primaryctor branch from a0163cf to bda2d73 Compare June 19, 2025 19:03
@jcouv jcouv marked this pull request as ready for review June 19, 2025 21:50
@jcouv jcouv requested a review from a team as a code owner June 19, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - Extension Everything The extension everything feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant