-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Do not offer string
(or other type-keywords) after ref/readonly
inside namespace member declaration
#67097
Conversation
Wait a minute, why is |
Because the others don't interfere with typing. So i'm only addressing the core case that is problematic. |
Maybe pull that logic up to |
Sure. i can try that. |
Moved up. Thanks :) |
if (token.Kind() is SyntaxKind.ReadOnlyKeyword) | ||
token = syntaxTree.FindTokenOnLeftOfPosition(token.SpanStart, cancellationToken); | ||
|
||
// if we're not after `ref` or `ref readonly` then don't offer `string` here. |
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.
// if we're not after `ref` or `ref readonly` then don't offer `string` here. | |
// if we're not after `ref` or `ref readonly` then don't offer keyword here. |
...Portable/Completion/KeywordRecommenders/AbstractSpecialTypePreselectingKeywordRecommender.cs
Outdated
Show resolved
Hide resolved
...Portable/Completion/KeywordRecommenders/AbstractSpecialTypePreselectingKeywordRecommender.cs
Outdated
Show resolved
Hide resolved
...Portable/Completion/KeywordRecommenders/AbstractSpecialTypePreselectingKeywordRecommender.cs
Outdated
Show resolved
Hide resolved
…stractSpecialTypePreselectingKeywordRecommender.cs
Co-authored-by: DoctorKrolic <[email protected]>
string
afer ref/readonly
inside namespace member declarationstring
(or other type-keywords) after ref/readonly
inside namespace member declaration
Fixes #67061
This is both not legal, and interferes with typing
ref struct
sincestring
sorts abovestruct
.