Explorar o código

exit pattern matching when :fakeEnum is found (fixed issue #1377)

Simon Krajewski %!s(int64=12) %!d(string=hai) anos
pai
achega
68d7ae590b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      matcher.ml

+ 1 - 1
matcher.ml

@@ -941,7 +941,7 @@ let match_expr ctx e cases def with_type p =
 		| _ ->
 			let e = type_expr ctx e Value in
 			begin match e.etype with
-			| TEnum(en,_) when PMap.is_empty en.e_constrs ->
+			| TEnum(en,_) when PMap.is_empty en.e_constrs || has_meta ":fakeEnum" en.e_meta ->
 				raise Exit
 			| _ ->
 				()