Skip to content
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

Closed
gafter opened this issue Feb 17, 2015 · 11 comments · Fixed by #2379

Comments

@gafter
Copy link
Member

gafter commented Feb 17, 2015

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.

@gafter gafter added Enhancement Language-VB Area-Compilers Test Test failures in roslyn-CI help wanted The issue is "up for grabs" - add a comment if you are interested in working on it labels Feb 17, 2015
@marstr
Copy link
Contributor

marstr commented Feb 26, 2015

I can take a look at this.

@gafter
Copy link
Member Author

gafter commented Feb 26, 2015

@marstr That would be awesome!

@gafter gafter added this to the 1.0-rc2 milestone Feb 26, 2015
@theoy theoy assigned gafter and unassigned gafter Mar 5, 2015
@theoy
Copy link
Contributor

theoy commented Mar 5, 2015

Gah, wanted to assigned to @marstr. Need to get you added as a contributor.

@gafter
Copy link
Member Author

gafter commented Mar 7, 2015

@marstr Can you tell me when you expect to work on this?

@gafter
Copy link
Member Author

gafter commented Mar 7, 2015

The following should compile without error

Module Program
    Sub M(Of TP)(Optional name As String = NameOf(TP))
    End Sub
End Module

@marstr
Copy link
Contributor

marstr commented Mar 9, 2015

I'll get this finished by tomorrow morning. Should be easy enough :)

@marstr
Copy link
Contributor

marstr commented Mar 10, 2015

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?

@gafter
Copy link
Member Author

gafter commented Mar 10, 2015

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".

@marstr
Copy link
Contributor

marstr commented Mar 10, 2015

Okay, will do!

@gafter
Copy link
Member Author

gafter commented Apr 29, 2015

@marstr Do you have a change I can pick up to complete this?

@marstr
Copy link
Contributor

marstr commented Apr 29, 2015

Gah, sorry I got side tracked and never finished this. I suppose it's for the best to have someone else pick this up.

gafter added a commit to gafter/roslyn that referenced this issue Apr 29, 2015
@gafter gafter added 4 - In Review A fix for the issue is submitted for review. and removed 3 - Working labels Apr 29, 2015
@gafter gafter removed the 4 - In Review A fix for the issue is submitted for review. label May 1, 2015
@gafter gafter removed their assignment May 1, 2015
@gafter gafter removed the help wanted The issue is "up for grabs" - add a comment if you are interested in working on it label May 1, 2015
@jaredpar jaredpar removed this from the 1.0 (stable) milestone Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants