Files
c3c/test/test_suite/errors/try_known_optional2.c3t
Christoffer Lerno cdabe8fd9e - Create optional with ~ instead of ?. return io::EOF?; becomes return io::EOF~.
- Deprecated use of `?` to create optional.
2026-01-20 16:10:28 +01:00

19 lines
272 B
Plaintext

// #target: macos-x64
module test;
import std;
fn int main()
{
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
store i32 3, ptr %x, align 4
ret i32 0
}