Permalink
Browse files

'=' should not escape '{ ... }' blocks in patterns.

  • Loading branch information...
1 parent d39fc9a commit 7dd83fb955fe4d3bd462732d8a4a52499c193711 @samoht samoht committed Mar 26, 2012
Showing with 6 additions and 1 deletion.
  1. +1 −1 src/block.ml
  2. +5 −0 tests/pattern.ml
View
@@ -507,7 +507,7 @@ let rec update_path t stream tok =
| EQUAL when in_pattern t.path ->
let path =
- unwind (function KExternal|KParen|KModule|KType|KLet|KLetIn -> true | _ -> false) t.path in
+ unwind (function KExternal|KParen|KBrace|KModule|KType|KLet|KLetIn -> true | _ -> false) t.path in
(match path with
| [] -> append (KBody KNone) L 2 []
| {k=KParen}::_ -> path
View
@@ -1,4 +1,9 @@
let f = match x with
+ | { x = 3 } ->
+ let x = 4 in
+ ()
+
+let f = match x with
| (X|Y) | (Z|U) -> 1
| K -> 2

0 comments on commit 7dd83fb

Please sign in to comment.