Why doesn't Intellisense work if I do something like this.
It does work though if I explicitly declare Foo
The problem reproes. It is a problem with parsing incomplete code.
The line that you started (foo.
) gets parsed together with the local function on the line below. This causes the local function not to be parsed correctly, so VS doesn't know that GetFoo
is a local function any more or that it returns a Foo
.