Browse Source

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

Simon Krajewski 10 years ago
parent
commit
99efbe15f4
1 changed files with 1 additions and 1 deletions
  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