浏览代码

allow using abstracts as value if they have `@:runtimeValue`

Simon Krajewski 10 年之前
父节点
当前提交
99efbe15f4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      filters.ml

+ 1 - 1
filters.ml

@@ -8,7 +8,7 @@ open Typecore
 let rec verify_ast e = match e.eexpr with
 	| TField(_) ->
 		()
-	| TTypeExpr(TClassDecl {cl_kind = KAbstractImpl _}) ->
+	| TTypeExpr(TClassDecl {cl_kind = KAbstractImpl a}) when not (Meta.has Meta.RuntimeValue a.a_meta) ->
 		error "Cannot use abstract as value" e.epos
 	| _ ->
 		Type.iter verify_ast e