소스 검색

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

Simon Krajewski 12 년 전
부모
커밋
c795f9a2b6
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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
 			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;
 			if inline && dynamic then error "You can't have both 'inline' and 'dynamic'" p;
 			ctx.type_params <- (match c.cl_kind with
 			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
 					params @ a.a_types
 				| _ ->
 				| _ ->
 					if stat then params else params @ ctx.type_params);
 					if stat then params else params @ ctx.type_params);