mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Reflect newtypes in path instructions
This commit is contained in:
parent
0004e77940
commit
5988257bde
2 changed files with 103 additions and 87 deletions
|
@ -1,13 +1,16 @@
|
|||
procedure Test.0 ():
|
||||
let Test.10 : Str = "err";
|
||||
let Test.9 : [C Str, C Str] = TagId(1) Test.10;
|
||||
joinpoint Test.8:
|
||||
let Test.4 : Str = UnionAtIndex (Id 0) (Index 0) Test.9;
|
||||
let Test.12 : Str = "err";
|
||||
let Test.11 : [C Str, C Str] = TagId(1) Test.12;
|
||||
let Test.8 : U8 = 1i64;
|
||||
let Test.9 : U8 = GetTagId Test.11;
|
||||
let Test.10 : Int1 = lowlevel Eq Test.8 Test.9;
|
||||
if Test.10 then
|
||||
let Test.3 : Str = UnionAtIndex (Id 1) (Index 0) Test.11;
|
||||
inc Test.3;
|
||||
dec Test.11;
|
||||
ret Test.3;
|
||||
else
|
||||
let Test.4 : Str = UnionAtIndex (Id 0) (Index 0) Test.11;
|
||||
inc Test.4;
|
||||
dec Test.9;
|
||||
dec Test.11;
|
||||
ret Test.4;
|
||||
in
|
||||
let Test.3 : Str = UnionAtIndex (Id 1) (Index 0) Test.9;
|
||||
inc Test.3;
|
||||
dec Test.9;
|
||||
ret Test.3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue