Files
lib_compiler/tests/assign_void_proc.txt
2024-04-13 15:29:53 +02:00

18 lines
511 B
Plaintext

// #failed: resolve
A :: proc() {}
B :: proc() {}
C :: proc() {}
D :: proc() {}
E :: proc() {}
main :: proc(): int {
a := A();
b := +B();
c := C() + D();
e := E() + 10;
return 0;
}
// #error: cannot assign void expression to a variable
// #error: invalid unary operation for type 'void'
// #error: cannot perform binary operation, types don't qualify for it, left: 'void' right: 'void'
// #error: cannot perform binary operation, types don't qualify for it, left: 'void' right: 'UntypedInt'