MVCoconut / coconut.data

Observable Data Layer.
The Unlicense
20 stars 8 forks source link

Handle an early return in the constructor #86

Closed gene-pavlovsky closed 7 months ago

gene-pavlovsky commented 8 months ago

Currently an early return in the constructor results in an incomprehensible error with no error position. If possible, the early return should be supported/allowed. Otherwise a proper error should be logged.

class Test {
    static function main() {
        new Model();
    }
}

class Model implements coconut.data.Model {
    public function new() {
        return;
    }
}

...REDACTED.../haxe/haxe_libraries/coconut.data/0.12.1/github/84220904556e1c6f212559e53fc70caea93f3f89/src/coconut/data/macros/ModelBuilder.hx:218: characters 9-20 : Cannot return null from Void-function