On Sunday, 21 February 2021 at 18:07:49 UTC, JN wrote:
class Foo { }void main() { Foo Foo = new Foo(); } this kind of code compiles. Is this expected to compile?
Yes, why wouldn't it? main is a different scope than global; you can override identifiers from global in main. And "Foo" only exists after the declaration, so it doesn't conflict.