scala/scala — pull request #2771 by retronym (2013-07-25 04:25:37+00:00)
Title: SI-7694 Disable type constraint checking for synthetic TypeTrees

Which might be based on slack LUBs that fail to capture constraints
between type parameters.

This slackness is noted in `mergePrefixAndArgs`:

// Martin: I removed this, because incomplete. Not sure there is a
// good way to fix it. For the moment we just err on the conservative
// side, i.e. with a bound that is too high.

Review by @adriaanm

This was reported in the context of scala-async; we use an inferred LUB in a TypeTree synthesized by the ANF transform. This PR uses named arguments as a simpler way to demonstrate the same problem.

I'm pretty sure fixing the LUB itself would be pretty tricky, so I'm proposing that we disable the check. An alternative to discuss would be to introduce a new compiler option to control whether or not we check synthetic TypeTrees.

Targetting 2.10.x as this fix is needed by a customer.