-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Make GenerateType work off of an Incomplete-Member. #14778
Make GenerateType work off of an Incomplete-Member. #14778
Conversation
Tagging @dotnet/roslyn-compiler @dotnet/roslyn-ide |
@dotnet/roslyn-compiler Please review simple change to SyntaxFacts. Thanks! |
Compiler changes LGTM. I'll try to fix #7536 sooner rather than later, but C# 7 changes have to take priority. |
@@ -195,6 +195,9 @@ public static bool IsInTypeOnlyContext(ExpressionSyntax node) | |||
|
|||
case TypedVariableComponent: | |||
return ((TypedVariableComponentSyntax)parent).Type == node; | |||
|
|||
case IncompleteMember: | |||
return ((IncompleteMemberSyntax)parent).Type == node; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return ((IncompleteMemberSyntax)parent).Type == node; [](start = 23, length = 54)
Does this change the way SemanticModel APIs behave? Please add compiler tests for them and a direct test for IsInTypeOnlyContext API. src\Compilers\CSharp\Test\Symbol\Compilation\SemanticModelGetSemanticInfoTests.cs looks like a good place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do, thanks @AlekseyTs . If i make those changes, are you ok with this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, other than that, LGTM.
No description provided.