fusionlanguage / fut

Fusion programming language. Transpiling to C, C++, C#, D, Java, JavaScript, Python, Swift, TypeScript and OpenCL C.
https://fusion-lang.org
GNU General Public License v3.0
1.77k stars 55 forks source link

Duplicated symbol error reported on wrong line #161

Closed iAndyHD3 closed 6 months ago

iAndyHD3 commented 6 months ago

The following code:

public class Foo               //1
{                              //2
    public const int a = 0;    //3
    public const int a = 0;    //4
}                              //5

Reports an error on line 5 instead of line 4 Foo.fu(5): ERROR: Duplicate symbol According to my testing, this only occurs with public const fields

However same issue with classes:

public class Bar //1
{                //2
}                //3
public class Bar //4
{                //5
}                //6

Reports an error on line 5 instead of line 4

pfusik commented 6 months ago

Thanks for reporting!