This project is read-only.

Speculative parsing misses declarations


Blank console application, start with:
namespace ConsoleApplication1
    class Program
        static void Main(string[] args)
When you type Console.Write( above the args.ToString(); line, the args parameter is marked as not declared through the whole method and not offered by autocomplete for the Write method parameters, which is rather painful. This does not happen without Roslyn.

(hopefully speculative means what I think it means :-))


JanKucera wrote May 12, 2014 at 10:45 PM

Also, probably related:
bool b;
MyClass c = new |
b = true;
Here new autocomplete defaults to bool instead of MyClass

SSL wrote May 28, 2014 at 4:08 AM

This happens because the parser incorrectly things you're starting a declaration expression, and that args is the name of the variable you're about to declare.

This has been filed before.

(your comment is an unrelated bug, AFAIK)

ADGreen wrote Jun 6, 2014 at 10:08 PM


In the latest builds including the CTP released this week the IDE automatically inserts the closing parenthesis when you start typing the method call. With this feature on args shows up in IntelliSense.

Please try out the latest CTP ( and let us know if you still have issues.


-Anthony D. Green, Program Manager, Visual Basic & C# Languages Team

JanKucera wrote Jun 7, 2014 at 12:56 PM


thanks for your reply. By inserting closing parenthesis or semicolon, this issue can be workarounded even in the 2013 preview. However I hope this gets actually fixed as it is really an annoying one when automatic parenthesis closing is not turned on. I wouldn't have said this is a big deal but I am hitting it every day.


JanKucera wrote Oct 18, 2014 at 4:51 PM

Is there any update on my comment marked as unrelated bug? Should I file it separately? I hit this issue on VS14 CTP4.