-- Testing complex numbers
fun comp test16() {
a <- take;
emit a;
let x = complex16 { re = 2; im = 3 };
let y = complex16 { re = 3; im = 4 };
emit (if x == x then 1 else 0);
emit (if x == y then 1 else 0);
emit a;
}
let comp main = read[int] >>> test16() >>> write[int]
is accepted by the type checker, but we don't in fact support comparing complex numbers for equality in the code generator.
For example,
is accepted by the type checker, but we don't in fact support comparing complex numbers for equality in the code generator.