compiler-design-eth/javali_tests/HW2_nop90/Expressions.javali
Carlos Galindo bf60a078d7
Homework 2
2020-01-15 22:30:09 +01:00

22 lines
No EOL
575 B
Text

/* 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;
}
}