Ver Fonte

allow access to abstract type parameters only in implementation functions and selective @:to statics of @:multiType abstracts

Simon Krajewski há 12 anos atrás
pai
commit
c795f9a2b6
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      typeload.ml

+ 1 - 1
typeload.ml

@@ -1440,7 +1440,7 @@ let init_class ctx c p context_init herits fields =
 			let dynamic = List.mem ADynamic f.cff_access || (match parent with Some { cf_kind = Method MethDynamic } -> true | _ -> false) in
 			if inline && dynamic then error "You can't have both 'inline' and 'dynamic'" p;
 			ctx.type_params <- (match c.cl_kind with
-				| KAbstractImpl a ->
+				| KAbstractImpl a when Meta.has Meta.Impl f.cff_meta || Meta.has Meta.MultiType a.a_meta && Meta.has Meta.To f.cff_meta ->
 					params @ a.a_types
 				| _ ->
 					if stat then params else params @ ctx.type_params);