2
0
Эх сурвалжийг харах

don't try to look for toString on Dynamic<T> (closes #5005)

Simon Krajewski 9 жил өмнө
parent
commit
6c2f4709c4

+ 1 - 1
src/typing/typer.ml

@@ -4044,7 +4044,7 @@ and type_call ctx e el (with_type:with_type) p =
 				begin match follow e.etype with
 				begin match follow e.etype with
 					| TInst({cl_path=[],"String"},_) -> raise Not_found
 					| TInst({cl_path=[],"String"},_) -> raise Not_found
 					| TMono _ -> raise Not_found
 					| TMono _ -> raise Not_found
-					| t when t == t_dynamic -> raise Not_found
+					| TDynamic _ -> raise Not_found
 					| _ -> ()
 					| _ -> ()
 				end;
 				end;
 				let acc = type_field ~resume:true ctx e "toString" p MCall in
 				let acc = type_field ~resume:true ctx e "toString" p MCall in

+ 5 - 0
tests/misc/projects/Issue5005/Main.hx

@@ -0,0 +1,5 @@
+class Main {
+	static public function main() {
+		trace(haxe.rtti.Meta.Meta.getType(Main));
+	}
+}

+ 2 - 0
tests/misc/projects/Issue5005/compile.hxml

@@ -0,0 +1,2 @@
+-main Main
+--interp