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
Use NameOf
instead of explicit string literals.
#1879
Conversation
@@ -195,7 +195,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic | |||
Throw New ArgumentException("Must resolve overloads on PropertySymbol or MethodSymbol", "TMember") | |||
End If | |||
If isProperties And Not typeArguments.IsEmpty Then | |||
Throw New ArgumentException(VBResources.PropertiesCanNotHaveTypeArguments, "typeArguments") | |||
Throw New ArgumentException(VBResources.PropertiesCanNotHaveTypeArguments, NameOf(members)) |
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.
This is incorrect.
Good idea, but bad execution. No thanks. |
This reverts commit 6e05734.
…the Roslyn VB code base.
@gafter I've pushed an update correcting the error introduce by the tool I used. I've gone through each one and made sure that they are all correct. |
@gafter Considering how easy it is to write automated transforms using Roslyn, it's a pretty safe bet that if you see obvious errors in something otherwise simple like this you've found a bug in someone's tools. 👍 |
Looks good to me. @agocke does this look good to you? |
@@ -1,5 +1,4 @@ | |||
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | |||
|
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.
I think we need the copyright notice.
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.
I can't remember changing that but will fix it.
Barring the missing copyright notice, LGTM |
Integrated in 8b65942 |
End If | ||
|
||
Dim vbsymbol = symbol.EnsureVbSymbolOrNothing(Of symbol)("symbol") | ||
Dim vbsymbol = symbol.EnsureVbSymbolOrNothing(Of symbol)(NameOf(position)) |
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.
@AdamSpeight2008 @gafter This appears to have been accidentally changed from symbol to position.
Integrated in 8b65942 |
@mikedn Thanks for catching those! I'll fix them immediately. |
Change to use VB.net's
NameOf
operator, instead of explicit strings.