Method-static variables have no distinct characteristics from regular variables on a macro level after typing.
class Test {
static function main() {
var local = "hello";
static var methodLocal = "world";
}
}
Both are typed as TLocal, as well as both are listed in Context.getLocalTVars() without any clear indication that methodLocal is a static var.
Expected: Typed as TField, pointing at the generated class-level static var, or at least some indication in the TVar that variable is a method-static variable.
Affected versions: Haxe stable and nightly.
Full reproduction code using hl.Ref to cause a compile time error on static var: https://try.haxe.org/#A17c580D
Method-static variables have no distinct characteristics from regular variables on a macro level after typing.
Both are typed as
TLocal
, as well as both are listed inContext.getLocalTVars()
without any clear indication thatmethodLocal
is astatic var
.Expected: Typed as
TField
, pointing at the generated class-level static var, or at least some indication in theTVar
that variable is a method-static variable.Affected versions: Haxe stable and nightly. Full reproduction code using
hl.Ref
to cause a compile time error on static var: https://try.haxe.org/#A17c580D