dotnet / vblang

The home for design of the Visual Basic .NET programming language and runtime library.
288 stars 66 forks source link

NameOf does not return the canonical name of the parameter #504

Open jrmoreno1 opened 8 years ago

jrmoreno1 commented 8 years ago

Version Used: Microsoft Visual Studio Enterprise 2015 Version 14.0.25123.00 Update 2 Microsoft .NET Framework Version 4.6.01590

Installed Version: Enterprise

Visual Basic 2015 00322-90150-04967-AA372 Microsoft Visual Basic 2015

Steps to Reproduce:

  1. Turn off pretty listing (Tools->Options->Text Editor->Basic->Advanced->Editor Help->Pretty listing
  2. run code below Module Module1

    Sub Main() Dim VARiable As Integer Console.WriteLine(NameOf(VARIABLE)) End Sub

Expected Behavior: Output VARiable Actual Behavior: Outputs VARIABLE

KathleenDollard commented 4 years ago

This is super stinky. But it has had little action and has now been here so long fixing it would be a breaking change. Especially because if you have pretty listing on, this won't happen.

So, not planning to fix.

BTW, @gafter is just doing normal maintenance on Roslyn in moving things to this repo.

tverweij commented 4 years ago

Actually, VB is case insensitive, so both outcomes can be right.

RevensofT commented 4 years ago

Hi @jrmoreno1 , I think it might be some cut corner in NameOf code but I think this is a rarity error because most VB dev going to type first 3 characters and space bar. X)