-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
103 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-module(test_fix_101). | ||
|
||
main(X) -> | ||
case X of | ||
{abc, Foo, Bar} -> ok | ||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
open Test_util | ||
|
||
let%expect_test "test_fix_101.beam" = | ||
print_ast "test_fix_101.beam"; | ||
[%expect {| | ||
(Ok ( | ||
AbstractCode ( | ||
ModDecl ( | ||
(AttrFile | ||
(line 1) | ||
(file test_fix_101.erl) | ||
(file_line 1)) | ||
(AttrMod | ||
(line 1) | ||
(module_name test_fix_101)) | ||
(DeclFun | ||
(line 3) | ||
(function_name main) | ||
(arity 1) | ||
(clauses (( | ||
ClsFun | ||
(line 3) | ||
(patterns (( | ||
PatVar | ||
(line 3) | ||
(id X)))) | ||
(guard_sequence ()) | ||
(body ( | ||
ExprBody ( | ||
exprs (( | ||
ExprCase | ||
(line 4) | ||
(expr ( | ||
ExprVar | ||
(line 4) | ||
(id X))) | ||
(clauses (( | ||
ClsCase | ||
(line 5) | ||
(pattern ( | ||
PatTuple | ||
(line 5) | ||
(pats ( | ||
(PatLit ( | ||
lit ( | ||
LitAtom | ||
(line 5) | ||
(atom abc)))) | ||
(PatVar (line 5) (id Foo)) | ||
(PatVar (line 5) (id Bar)))))) | ||
(guard_sequence ()) | ||
(body ( | ||
ExprBody ( | ||
exprs (( | ||
ExprLit ( | ||
lit ( | ||
LitAtom | ||
(line 5) | ||
(atom ok)))))))))))))))))))) | ||
FormEof)))) |}] |