assemblyscript
assemblyscript copied to clipboard
Forbid duplicate namespace/static class members
(Barely) fixes #2793.
Changes proposed in this pull request: ⯈ Check diagnostics after initialize (VERY BAD) ⯈ Forbid duplicate namespace/static class members
Requiring the compiler to check diagnostics after initialize is VERY BAD, and ideally someone should find a way to prevent the compiler from attempting to compile the duplicate global (which it shouldn't see to begin with).
- [x] I've read the contributing guidelines
- [x] I've added my name and email to the NOTICE file
I wonder why do we need to split lots of test.
Yeah, checking diagnostics after initialize is VERY BAD.
Cannot detect this case
namespace A { export function foo(): i32 { return 1; } }
class A { static foo(): i32 { return 2; } }
export function _start(): void { trace("", 1, A.foo()); }
Cannot detect this case
That's not good at all.