Skip to content

Commit

Permalink
'=' should not escape '{ ... }' blocks in patterns.
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht committed Mar 26, 2012
1 parent d39fc9a commit 7dd83fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/block.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions tests/pattern.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
let f = match x with
| { x = 3 } ->
let x = 4 in
()

let f = match x with
| (X|Y) | (Z|U) -> 1
| K -> 2
Expand Down

0 comments on commit 7dd83fb

Please sign in to comment.