compiler-design-eth/javali_tests/HW2_nop90/Expressions.javali

22 lines
575 B
Text
Raw Normal View History

2020-01-15 22:30:09 +01:00
/* testing different expressions
compiler should recognize Type error: Return statement of method with void return type should not have arguments
*/
class Main {
void main() {
return;
return true;
return false;
return 0x10;
return 10;
return variable;
return array[index];
return methodAccess();
return object.field;
return object.call();
return op + op2;
return op / asd * asd && a == true;
return this.run();
return this;
return this.field;
}
}