22 lines
No EOL
575 B
Text
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;
|
|
}
|
|
} |