CSharpShellApp icon indicating copy to clipboard operation
CSharpShellApp copied to clipboard

CallerlinenumberAttribute bug

Open kovlevi opened this issue 2 years ago • 5 comments

If I use CallerLinenumberAttribute in method, the returned number is not correct, e.g in one of the source code files the app displays number 57,but it's in number 48,and every call is +9 than the correct number of line in this file.

kovlevi avatar Nov 03 '22 19:11 kovlevi

Not exactly a bug, just a nececity. Before compiling a source file the app adds some bits of source code like this: using Console = CSharpShell.Console; Without that you will get loads of PlatformNotImplementedException from System.Console. I'll try condensing it all with the first code line. That should work.

radimitrov avatar Nov 06 '22 15:11 radimitrov

I just had to revert the fix for this. It will now always be an "off by one" bug.

radimitrov avatar Nov 14 '22 18:11 radimitrov

I think related to the # bug #223? Maybe add the lines after existing #define's because, even before the bugfix was some issues with #define's. They must be first.

Not tested with current version. Out of memory... //#define one #define two

Alisis33 avatar Nov 18 '22 19:11 Alisis33

Yes, it is. And that has always been the solution. I just modified it to only use one line for aliases

radimitrov avatar Nov 19 '22 08:11 radimitrov

To hafe global aliases would be a nice feature, maybe a featurerequest for the compiler developers?

Alisis33 avatar Dec 14 '22 16:12 Alisis33