-
Notifications
You must be signed in to change notification settings - Fork 10.3k
const
results in error CS0648: '' is a type not supported by the language
#955
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
Comments
const
results in error CS0648: '' is a type not supported by the language
+1 |
@barrytang looks like maybe something with the debugger or Roslyn is changed? Do you know a contact there? |
I ran into this a few weeks ago, and wrote a blog post with some detail yesterday: http://gigi.nullneuron.net/gigilabs/nasty-const-bug-in-asp-net-5/ |
I contacted the Roslyn team to have them take a look at this. |
Since constants aren't actually locals (they're just inline values in the emitted IL), we have to retrieve their name/value/type from the I should be able to make the watch for |
I have a PR out to ignore the I've also opened an internal bug for the core debugger to figure out why reading the signature of a |
This is now being tracked on the Roslyn GitHub org and also in an internal MSFT bug database, so I'm closing this out. Thanks, everyone! |
REPRO
Program.cs
to reflect code snippet below.Console.WriteLine(a);
a
andb
click Add WatchCODE
EXPECTED
Watch window displays values for variables
a
andb
ACTUAL
Watch window Value column for variables
a
andb
displays:NOTES
a
is written correctly to Consoleconst
from the snippet reverts to EXPECTED bevahiourThe text was updated successfully, but these errors were encountered: