closes #9584
@@ -1325,7 +1325,7 @@ and type_array_decl ctx el with_type p =
| Some t ->
let el = List.map (fun e ->
let e = type_expr ctx e (WithType.with_type t) in
- AbstractCast.cast_or_unify ctx t e p;
+ AbstractCast.cast_or_unify ctx t e e.epos;
) el in
mk (TArrayDecl el) (ctx.t.tarray t) p)
@@ -0,0 +1,8 @@
+class Main {
+ static function main() {
+ final foo:Array<{x:Int, y:Int}> = [
+ {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1},
+ {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1}, {x: 0, y: 1}, {x: 0,}
+ ];
+ }
+}
@@ -0,0 +1 @@
+Main
@@ -0,0 +1,3 @@
+Main.hx:5: characters 74-81 : Object requires field y
+Main.hx:5: characters 74-81 : { x : Int } should be { y : Int, x : Int }
+Main.hx:5: characters 74-81 : ... { x : Int } has no field y