compiler-design-eth/javali_tests/HW4_nop90/Casts/ErrPrimitiveCast.javali

13 lines
148 B
Text
Raw Permalink Normal View History

2020-01-15 22:34:57 +01:00
// Test types in a Cast
// cannot cast an int to an boolean
class Main {
void main() {
int a;
boolean b;
a = 1;
b = (boolean) a;
}
}