Open bobzhang opened 2 months ago
fn testgxx () -> Unit { let v = 0N match v { 1 => println("hello") } println(v) }
==>
fn testgxx () -> Unit { let v/1 : BigInt = BigInt::from_string("0") in if BigInt::op_equal(v/1, BigInt::from_string("1")) { $builtin.println("hello") } else { raise "match_failure" } $builtin.println(v/1) }
for pattern match: we can provide two functions, so that no allocation is needed in most cases:
equal_int(BigInt, Int) -> Bool equal_int64(BigInt, Int64) -> Bool
cc @Yoorkin @peter-jerry-ye
==>