Name conflict between class and variable in root namespace but valac only outputs obscure cc error
Consider the code snippet
class test
{
public string name;
public test(string name_var)
{
name = name_var;
}
}
int main()
{
var test = new test("hello");
return 0;
}
This code cannot be compiled because of the name conflict between the class test
in the root namespace and the variable test
in the main() scope of the root namespace, but valac only outputs very obscure cc error
error: ‘_tmp0_’ undeclared (first use in this function)
287 | test* _tmp0_;
| ^~~~~~
valac version: 0.52.2