Closed
Description
Right now, when processing a constraint (like T1 <: T2
), infer does not track any sort of location information. It should be given a span and a boolean indicating which type (the super of sub type) should be referred to as the "expected type". This boolean value will be switch when we call contratys()
or contraregions()
.
These changes would enable better error messages. We could get the "expected foo, found bar" messages more accurate, and we would be able to pass better spans into the (yet to be landed, as of this writing) new region inference, which could then describe more accurately to the user where conflicting constraints originate from.