Stream: t-compiler

Topic: never type fallback


nikomatsakis (Mar 13 2020 at 20:20, on Zulip):

Hey @Aaron Hill -- we should touch base at some point on never type fallback (cc @llogiq). I'm curious to push a bit on this approach that I had been advocating for early on and I'm wondering if either of you have interest in exploring that.

Aaron Hill (Mar 18 2020 at 22:21, on Zulip):

Sounds good to me

nikomatsakis (Mar 31 2020 at 19:29, on Zulip):

OK @Aaron Hill @llogiq so .. let me try to circle back to this yet again. =) So I wrote a comment that linked to a branch. The key idea there was to (a) identify type variables that that got their value as a result of diverging fallback and then (b) warn when we find those type variables in "certain contexts". The challenge is narrowing down that notion of "certain contexts".

The current branch was just warning whenever the type of any expression is changed as a result of "diverging fallback". That's clearly not correct. I think what we conceptually want is to warn whenever the type of a live expression is changed as the result of diverging fallback. That raises, of course, the question of how to determine where the "live" expressions are.

nikomatsakis (Mar 31 2020 at 19:29, on Zulip):

I think I will leave some comments in the github issue

nikomatsakis (Mar 31 2020 at 19:47, on Zulip):

Done

Last update: Jun 04 2020 at 18:40UTC