elnabo / json2object

Type safe Haxe/JSON (de)serializer
MIT License
66 stars 17 forks source link

Error position in wrongly typed @:default #35

Closed ibilon closed 6 years ago

ibilon commented 6 years ago
import json2object.JsonParser;

@:enum abstract MyType(String) {
var Value = "test";
}

typedef Struct = {
  @:default(1) var value : MyType;
}

class Main {
  static function main() {
    var p = new JsonParser<Struct>();
  }
}

Compiling gives Main.hx:13: characters 16-34 : Int should be MyType, error shouldn't be on line 13 but line 8.