XSharpPublic icon indicating copy to clipboard operation
XSharpPublic copied to clipboard

Feature request: Show late bound calls in Visual Studio

Open VolkmarR opened this issue 4 years ago • 5 comments

In our legacy applications, we use late bound calls extensively. To raise awareness to the developer, that method calls / assigns / accesses are done in late bound (and therefore are not checked by the compiler), it might be helpful that Visual Studio shows some kind of discrete hint for those calls.

The hint could be, that the method calls / assigns / accesses are highlighted in a different color or that a dotted line is drawn under the method calls / assigns / accesses.

VolkmarR avatar Nov 16 '21 11:11 VolkmarR

Volkmar,

This is a great idea but will need some research to make it work without slowing down the editor too much. We need to detect all variables that are untyped (USUAL, OBJECT) and detect that they are used as left hand side in a send operation.

RobertvanderHulst avatar Nov 16 '21 12:11 RobertvanderHulst

Thanks. Yes, it is very important, that this feature doesn't impact the editing performance.

Maybe it could help, if you limit this to method parameters and local variables for the first version.

And it probably is a good idea to make this optional.

VolkmarR avatar Nov 16 '21 12:11 VolkmarR

Volkmar, It will definitely be optional. People with a lot of late bound code will most likely be shocked to see underlines (or whatever we choose) everywhere in their code.

RobertvanderHulst avatar Nov 16 '21 12:11 RobertvanderHulst

Maybe it would be better to implement this in the compiler and make it report (optional) warnings on late bound calls?

cpyrgas avatar Nov 16 '21 14:11 cpyrgas

I personally think, that the warnings will not help that much because there will be millions of them in legacy projects. And if I want to get a list of all the late bound calls, I can temporally deactivate the late bound option for the project to get all the errors.

VolkmarR avatar Nov 16 '21 15:11 VolkmarR