Codegen error in if (try x = (false ? io::EOF? : 1)), i.e. using if-try with a CT known value.

This commit is contained in:
Christoffer Lerno
2025-08-03 16:28:11 +02:00
parent 9fe6c77d28
commit 151a28a92a
3 changed files with 12 additions and 5 deletions

View File

@@ -3,18 +3,17 @@ module test;
import std;
fn int main()
{
if (try x = (true ? io::EOF? : 3))
if (try x = (false ? io::EOF? : 3))
{}
return 0;
}
/* #expect: test.ll
define i32 @main() #0 {
entry:
%x = alloca i32, align 4
store i32 0, ptr %x, align 4
br label %catch_landing
catch_landing: ; preds = %entry
store i32 3, ptr %x, align 4
ret i32 0
}
}