Browse Source

[gencommon] don't try generating reflection helpers for extern classes

Dan Korostelev 8 năm trước cách đây
mục cha
commit
04d4f2e904

+ 1 - 1
src/generators/gencommon/reflectionCFs.ml

@@ -1661,7 +1661,7 @@ let priority = solve_deps name [DAfter UniversalBaseClass.priority]
 let configure ctx baseinterface ~slow_invoke =
 let configure ctx baseinterface ~slow_invoke =
 	let run md =
 	let run md =
 		(match md with
 		(match md with
-		| TClassDecl cl when is_hxgen md && ( not cl.cl_interface || cl.cl_path = baseinterface.cl_path ) && (match cl.cl_kind with KAbstractImpl _ -> false | _ -> true) ->
+		| TClassDecl ({ cl_extern = false } as cl) when is_hxgen md && ( not cl.cl_interface || cl.cl_path = baseinterface.cl_path ) && (match cl.cl_kind with KAbstractImpl _ -> false | _ -> true) ->
 			implement_dynamics ctx cl;
 			implement_dynamics ctx cl;
 			if not (PMap.mem (mk_internal_name "hx" "lookupField") cl.cl_fields) then implement_final_lookup ctx cl;
 			if not (PMap.mem (mk_internal_name "hx" "lookupField") cl.cl_fields) then implement_final_lookup ctx cl;
 			if not (PMap.mem (mk_internal_name "hx" "getField") cl.cl_fields) then implement_get_set ctx cl;
 			if not (PMap.mem (mk_internal_name "hx" "getField") cl.cl_fields) then implement_get_set ctx cl;