Allow nested instance member access in nameof in static context#67461
Merged
jjonescz merged 12 commits intodotnet:mainfrom Apr 13, 2023
Merged
Allow nested instance member access in nameof in static context#67461jjonescz merged 12 commits intodotnet:mainfrom
nameof in static context#67461jjonescz merged 12 commits intodotnet:mainfrom
Conversation
Co-authored-by: Yair Halberstadt <yairh@google.com>
ecf8a7c to
4603d18
Compare
AlekseyTs
reviewed
Mar 24, 2023
AlekseyTs
reviewed
Mar 24, 2023
AlekseyTs
reviewed
Mar 24, 2023
AlekseyTs
reviewed
Mar 24, 2023
AlekseyTs
reviewed
Mar 24, 2023
Contributor
|
Done with review pass (commit 2) |
AlekseyTs
reviewed
Mar 28, 2023
AlekseyTs
reviewed
Mar 28, 2023
Member
|
Think we can just do an email review for this one. |
15 tasks
jcouv
reviewed
Mar 30, 2023
| } | ||
|
|
||
| #nullable enable | ||
| internal static bool IsFeatureAvailable(SyntaxNode syntax, MessageID feature) |
Member
There was a problem hiding this comment.
Could we use the existing CSharpCompilationExtensions.IsFeatureEnabled(this CSharpCompilation, MessageID) instead of introducing a new helper? #Closed
Member
Author
|
@dotnet/roslyn-compiler for a second review if there are no more test suggestions |
jcouv
reviewed
Apr 12, 2023
|
|
||
| Assert.True(model.GetSpeculativeSymbolInfo(argument2.Position, argument2, SpeculativeBindingOption.BindAsTypeOrNamespace).IsEmpty); | ||
|
|
||
| void verifySymbolInfo(SymbolInfo symbolInfo) |
Member
There was a problem hiding this comment.
nit: when possible, let's avoid nested local functions (for future consideration)
Member
|
Please update the listing on feature status page with new link to test plan. Other info in there probably needs to be updated as well for this feature (dev, reviewers, status). |
AlekseyTs
added a commit
to AlekseyTs/roslyn
that referenced
this pull request
Dec 10, 2025
…er chain The binder with the flag was injected manually as the current binder while binding attributes. Because of that BinderFlags.AttributeArgument was not preserved by `GetBinder` APIs. For example the API is used during binding of `nameof`. Various checks responsible for breaking infinite binding cycles were relying on the presence of the flag. Since after the change the flag is preserved when we are binding `nameof`, I had to add a fixup in several places to properly support IDS_FeatureInstanceMemberInNameof in context of an attribute. See dotnet#67461 that initially added support for the feature.
AlekseyTs
added a commit
that referenced
this pull request
Dec 11, 2025
…nder chain (#81628) Fixes #81576. A binder with the flag was injected manually as the current binder while binding attributes. Because of that `BinderFlags.AttributeArgument` was not preserved by `GetBinder` API. For example the API is used during binding of `nameof`. Various checks responsible for breaking infinite binding cycles are relying on presence of the flag. Since after the change the flag is preserved when we are binding `nameof`, I had to add a fixup in several places to properly support `IDS_FeatureInstanceMemberInNameof` feature in context of an attribute. See #67461 that initially added support for the feature.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #48754.
Fixes #40229.
Test plan: #67565