Open MeAmAnUsername opened 4 years ago
Other option: handle at syntactic level: expressions that never return can only be used as last statement Complicated: last statement of block, but also requires last statement of if statement, have to keep track of if a method can return normally? May not be relevant, I don't think Java keeps track of that.
Dead code is allowed (not checked for) in PIE but not in Java. There are also cases like
{ fail "error" }
that get compiled to code that doesn't compile due to dead codeOptions: