MeAmAnUsername / pie

Pipelines for Interactive Environments
Apache License 2.0
0 stars 0 forks source link

Handle dead code #13

Open MeAmAnUsername opened 4 years ago

MeAmAnUsername commented 4 years ago

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 code

Options:

MeAmAnUsername commented 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.