-
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
Add a test that a method type parameter can be used in Nameof() in parameter default value in VB #564
Comments
I can take a look at this. |
@marstr That would be awesome! |
Gah, wanted to assigned to @marstr. Need to get you added as a contributor. |
@marstr Can you tell me when you expect to work on this? |
The following should compile without error Module Program
Sub M(Of TP)(Optional name As String = NameOf(TP))
End Sub
End Module |
I'll get this finished by tomorrow morning. Should be easy enough :) |
Code change is made, waiting for VS15CTP6 to install to run tests. I added this test in src/Compilers/VisualBasic/Test/Syntax/Parser/ParseDeclarationTests.vb with just under Generic Class Declaration tests. Seem appropriate? |
We need it to not just parse, but also bind correctly. This should probably be be in symbol tests or binding tests. I suggest adding to the tests in NameOfTests.vb. Please add a test with an "expectedOutput". |
Okay, will do! |
@marstr Do you have a change I can pick up to complete this? |
Gah, sorry I got side tracked and never finished this. I suppose it's for the best to have someone else pick this up. |
In the review for the fix for #42, @AlekseyTs suggested we add an analogous test for the issue in VB. Specifically, we should test that a method's type parameters can be used inside a Nameof() expression in the default value for the method's value parameters.
It is possible that there is already such a test.
The text was updated successfully, but these errors were encountered: