Fix #15787 by squashing a coercion hole.

Authored by goldfire on Oct 28 2018, 3:08 PM.


Trac Issues

In type-incorrect code, we can sometimes let a coercion
hole make it through the zonker. If this coercion hole then
ends up in the environment (e.g., in the type of a data
constructor), then it causes trouble later.

This patch avoids trouble by substituting the coercion hole
for its representative CoVar. Really, any coercion would do,
but the CoVar was very handy.

test case: polykinds/T15787

Test Plan


goldfire created this revision.Oct 28 2018, 3:08 PM

I may not get a chance to cycle back to this one. If it validates, please merge. Thanks.