diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-04-08 22:51:16 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2017-04-08 23:26:05 +0200 |
commit | b159489576fc7afdee5b2d93e9465dbc87f8069e (patch) | |
tree | 3387b92f511c18fa91a8417b6b74a43d798e4a19 /tests/run/t5328.check | |
parent | 4d76265fac7edafc2fcf29ce6873fdb252fbba0d (diff) | |
download | dotty-b159489576fc7afdee5b2d93e9465dbc87f8069e.tar.gz dotty-b159489576fc7afdee5b2d93e9465dbc87f8069e.tar.bz2 dotty-b159489576fc7afdee5b2d93e9465dbc87f8069e.zip |
Fix #2201: Less aggressive type application reduction for better inference
Previously we believed that reducing type applications did not affect
type inference as long as the reduced type constructor had the same
arity as the unreduced one, for example reducing `Foo[X, Y]` is fine
when `Foo` is defined as:
type Foo[A, B] = Bar[A, B]
but not when it's defined as:
type Foo[A] = Bar[A, A]
But this is not a sufficient condition: the bounds of the type
constructor arguments also matter for type inference, so we need to be
more strict and disallow reductions in cases like:
type Foo[A, B] = Bar[B, A]
and:
type Foo[A, B] = Bar[A, Int]
Diffstat (limited to 'tests/run/t5328.check')
0 files changed, 0 insertions, 0 deletions