RealyUniqueName / Safety

Null safety for Haxe
MIT License
54 stars 5 forks source link

Safety: Field "v" is not nullable thus should have an initial value or should be initialized in constructor for getter #13

Closed restorer closed 5 years ago

restorer commented 5 years ago
class Bug8 {
    // Safety: Field "v" is not nullable thus should have an initial value or should be initialized in constructor.
    public var v(get, never) : Int;

    public function get_v() : Int {
        return 42;
    }
}

See https://github.com/restorer/haxe-safety-bugs/blob/master/safetybugs/Main.hx#L115 for working example.

restorer commented 5 years ago

This is for Haxe 4.0.0-preview.5 and Safety from master.

RealyUniqueName commented 5 years ago

Fixed here: https://github.com/HaxeFoundation/haxe/pull/7717