Open hills opened 1 week ago
Yep, that's a bug!
Thanks for reporting it.
If the inner function zzz()
declaration gets moved above the this.zzz = zzz;
assignment, the error no longer appears. It seems like the type checking is failing to take function hoisting into account.
In this minimal test case the compiler seems to be (incorrectly) type checking against a variable declared outside the scope?
@const
is necessary