Verified Commit e7769dfc authored by ubduq's avatar ubduq

Add test case for unreachable code

Programs that contain unreachable code are semantically valid MiniJava
according to the latest clarification of the language specification.
parent d6615144
/*
* MiniJava compilers are not allowed to reject programs only because
* they contain unreachable code, unlike Java compilers.
*/
class UnreachableCode {
public static void main(String[] args) {
int i = 42;
return;
int j = 23;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment