Page 1 of 1

Intellisense lost inside closure

PostPosted: January 16th, 2017, 3:39 pm
by davidbcn
Type hinting is completely lost with variables that are scoped into a closure using the "USE" keyword:

Image 3.png


In this example, if you do $instance->... outside the closure intellisense will populate the methods, properties, etc.. of the $instance class.

But doing the same inside the closure yields nothing.

Re: Intellisense lost inside closure

PostPosted: January 17th, 2017, 10:23 am
by Jakub Misek
Thank you David,

We'll handle variables in closures in a future update.

In this case, the type of "$instance" depends on where $promise() is called which we do not handle currently.