UCSD-PL / refscript

Refinement Types for Scripting Languages
BSD 3-Clause "New" or "Revised" License
65 stars 3 forks source link

Add DeadCast for Join #130

Closed ranjitjhala closed 8 years ago

ranjitjhala commented 9 years ago

We should be able to support examples like this:

tests/todo/opt-arg-02.ts

Because the 'undefined' branch is DEAD...

I've seen this issue come up repeatedly elsewhere too so would be nice to have a clean solution at some point.

panagosg7 commented 8 years ago

This is the same with:

https://github.com/UCSD-PL/refscript/blob/6501563d3b8edf72e3c1b17cd43b8d2d3a9bebe6/tests/pos/simple/60-opt-args.ts

which is fixed in refactor_types.

We will need to downcast because of the overloaded signature of <=.

Closing for now.