Nicolas Cannasse 15 سال پیش
والد
کامیت
1d0af802bf
2فایلهای تغییر یافته به همراه1 افزوده شده و 5 حذف شده
  1. 1 1
      codegen.ml
  2. 0 4
      tests/unit/TestReflect.hx

+ 1 - 1
codegen.ml

@@ -398,7 +398,7 @@ let block_vars ctx e =
 			let vl = List.map (fun (v,vt,ve) ->
 				if PMap.mem v used then begin
 					let vt = t.tarray vt in
-					v, vt, Some (mk (TArrayDecl (match ve with None -> [] | Some e -> [wrap used e])) (t.tarray vt) e.epos)
+					v, vt, Some (mk (TArrayDecl (match ve with None -> [] | Some e -> [wrap used e])) vt e.epos)
 				end else
 					v, vt, (match ve with None -> None | Some e -> Some (wrap used e))
 			) vl in

+ 0 - 4
tests/unit/TestReflect.hx

@@ -46,8 +46,6 @@ class TestReflect extends Test {
 			}
 		}
 		infos(null);
-		// we allow to have a common object class
-		allow( Class == Enum, [true,false] );
 		// these are very specific cases since we can't allow reflection on core type
 		unspec( function() Type.getEnumConstructs(Void) );
 		unspec( function() Type.getEnumConstructs(Bool) );
@@ -85,8 +83,6 @@ class TestReflect extends Test {
 		is(MyEnum,Enum);
 		is(Void,Enum);
 		is(Class,Class);
-		// it is allowed to have Class==Enum
-		if( Class == Enum ) is(Enum,Enum) else is(Enum,null);
 	}
 
 	function is( v : Dynamic, t1 : Dynamic, ?t2 : Dynamic, ?pos : haxe.PosInfos ){