compiler-design-eth/javali_tests/HW3_nop90/OperatorTests/ErrorUnaryOp.javali

20 lines
220 B
Text
Raw Permalink Normal View History

2020-01-15 22:32:25 +01:00
// Test type errors with unary operator
class Main {
void main() {
int x,y,z;
boolean a;
x = -100;
y = 5;
a = -true;
z = -y;
x = +x;
write(x);
writeln();
write(z);
writeln();
write(-a);
}
}