diff --git a/src/typing/typeloadFields.ml b/src/typing/typeloadFields.ml index 7e85bed8791..12bbbbb0041 100644 --- a/src/typing/typeloadFields.ml +++ b/src/typing/typeloadFields.ml @@ -602,9 +602,7 @@ let type_var_field ctx t e stat do_display p = let e = if do_display then Display.preprocess_expr ctx.com e else e in let e = type_expr ctx e (WithType.with_type t) in let e = AbstractCast.cast_or_unify ctx t e p in - match t with - | TType ({ t_path = ([],"UInt") },[]) | TAbstract ({ a_path = ([],"UInt") },[]) when stat -> { e with etype = t } - | _ -> e + e let type_var_field ctx t e stat do_display p = let save = TypeloadFunction.save_field_state ctx in diff --git a/tests/misc/compiler_loops/projects/Issue9428/TypedefAbstract.hx b/tests/misc/compiler_loops/projects/Issue9428/TypedefAbstract.hx index 3889ba46a39..a996e911cb8 100644 --- a/tests/misc/compiler_loops/projects/Issue9428/TypedefAbstract.hx +++ b/tests/misc/compiler_loops/projects/Issue9428/TypedefAbstract.hx @@ -10,6 +10,6 @@ typedef Rec2Struct = { class TypedefAbstract { static function main() { - var r:Rec2 = (null:Rec1); + var r:Rec2 = (null:Rec1); } } \ No newline at end of file diff --git a/tests/misc/compiler_loops/projects/Issue9428/TypedefTypedef.hx b/tests/misc/compiler_loops/projects/Issue9428/TypedefTypedef.hx index f2b2321e429..5ea2320a76d 100644 --- a/tests/misc/compiler_loops/projects/Issue9428/TypedefTypedef.hx +++ b/tests/misc/compiler_loops/projects/Issue9428/TypedefTypedef.hx @@ -8,6 +8,6 @@ typedef Rec2 = { class TypedefTypedef { static function main() { - var r:Rec1 = (null:Rec2); + var r:Rec1 = (null:Rec2); } } \ No newline at end of file