瀏覽代碼

[matcher] still bother in values

Simon Krajewski 6 年之前
父節點
當前提交
ff4b8d4856
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/typing/matcher.ml

+ 1 - 1
src/typing/matcher.ml

@@ -1612,7 +1612,7 @@ module Match = struct
 		{e with epos = p}
 
 	let match_expr ctx e cases def with_type postfix_match p = match cases,def with
-		| [],None ->
+		| [],None when (match with_type with WithType.NoValue -> true | _ -> false) ->
 			type_expr ctx e WithType.value
 		| _ ->
 			match_expr ctx e cases def with_type postfix_match p