Skip to content

Conversation

@AlekseyTs
Copy link
Contributor

Related to #78433.

…ed on value of InvokedAsExtensionMethod property

Related to dotnet#78433.
@AlekseyTs AlekseyTs requested a review from a team as a code owner September 12, 2025 15:12
@AlekseyTs AlekseyTs added Area-Compilers Feature - Extension Everything The extension everything feature labels Sep 12, 2025
Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

Just a couple of minor comments.

@AlekseyTs AlekseyTs requested a review from 333fred September 12, 2025 18:31
@AlekseyTs AlekseyTs requested a review from a team September 12, 2025 18:57
@AlekseyTs
Copy link
Contributor Author

@jcouv, @jjonescz, @dotnet/roslyn-compiler For a second review

// y.MemberwiseClone(); // warning2
Diagnostic(ErrorCode.WRN_NullableValueTypeMayBeNull, "y").WithLocation(15, 9),
// (15,11): error CS1540: Cannot access protected member 'object.MemberwiseClone()' via a qualifier of type 'int?'; the qualifier must be of type 'Program' (or derived from it)
// y.MemberwiseClone(); // warning2
Copy link
Member

Choose a reason for hiding this comment

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

Consider adjusting the // warning2 comment (there is no warning anymore, just an error)


void visitArguments(BoundCall node, ref readonly MethodInvocationInfo methodInvocationInfo)
{
if (node.IsErroneousNode)
Copy link
Member

@jjonescz jjonescz Sep 16, 2025

Choose a reason for hiding this comment

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

Why have you introduced these local functions (visitReceiver and visitArguments)? Couldn't the if (node.IsErroneousNode)s be added to the existing instance methods? #Resolved

Copy link
Contributor Author

@AlekseyTs AlekseyTs Sep 16, 2025

Choose a reason for hiding this comment

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

Why have you introduced these local functions

Because my intent is to adjust behavior of VisitCall method. I have no intent to affect any other existing or future callers of the other methods.

@AlekseyTs
Copy link
Contributor Author

@jcouv, @jjonescz, @dotnet/roslyn-compiler For a second review

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.

4 participants