flofriday / Moose

🐐 A new fun programming language
MIT License
6 stars 1 forks source link

Function and class name collision #39

Closed flofriday closed 1 year ago

flofriday commented 1 year ago
class A {

}

func A() > Int { return 4 }

print(A())

This code passes the typechecker however, it should not be allowed as it is not clear if we want to call the function or the constructor of the class A.

Jozott00 commented 1 year ago

True, I will fix it!