Check in failing reproduction for #5086

This commit is contained in:
Ayaz Hafiz 2023-03-05 21:40:10 -06:00
parent 424931459d
commit fb5ac9fc6e
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,35 @@
procedure Bool.1 ():
let Bool.23 : Int1 = false;
ret Bool.23;
procedure Num.19 (#Attr.2, #Attr.3):
let Num.256 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
ret Num.256;
procedure Test.3 (Test.4):
ret Test.4;
procedure Test.0 (Test.1):
joinpoint Test.13 Test.2:
let Test.11 : I64 = 1i64;
let Test.7 : I64 = CallByName Num.19 Test.1 Test.11;
joinpoint Test.8 Test.6:
ret Test.6;
in
switch Test.2:
case 0:
let Test.9 : I64 = CallByName Test.0 Test.7;
jump Test.8 Test.9;
default:
let Test.10 : I64 = CallByName Test.3 Test.7;
jump Test.8 Test.10;
in
let Test.15 : Int1 = CallByName Bool.1;
if Test.15 then
let Test.12 : Int1 = false;
jump Test.13 Test.12;
else
let Test.12 : Int1 = true;
jump Test.13 Test.12;

View file

@ -2723,3 +2723,16 @@ fn unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_ty
"#
)
}
#[mono_test]
fn inline_return_joinpoints() {
indoc!(
r#"
app "test" provides [f] to "./platform"
f = \x ->
caller = if Bool.false then f else \n -> n
caller (x + 1)
"#
)
}