slige/tests/generics.slg
2025-01-17 11:50:14 +01:00

18 lines
218 B
Plaintext

fn exit(status_code: int) #[builtin(Exit)] {}
fn id<T>(v: T) -> T {
v
}
fn main() {
if id::<int>(123) != 123 {
exit(1);
}
if id::<bool>(true) != true {
exit(1);
}
exit(0);
}