diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2015-11-26 16:37:50 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2015-11-30 22:30:39 +0100 |
commit | 6e4b4f4dd2f09ce787dfb2da4ae9fffe2b30b07a (patch) | |
tree | 4f51b763651017d041a0a0b000517376d96e1a46 /.gitattributes | |
parent | 112564655f4f23552cb9ae48d0fdb7d8ac5b725c (diff) | |
download | dotty-6e4b4f4dd2f09ce787dfb2da4ae9fffe2b30b07a.tar.gz dotty-6e4b4f4dd2f09ce787dfb2da4ae9fffe2b30b07a.tar.bz2 dotty-6e4b4f4dd2f09ce787dfb2da4ae9fffe2b30b07a.zip |
TypeComparer: delay looking up members of AndTypes
In ParFactory.scala we have checks that look like:
(Foo { type Bar = X }) & (Foo { type Bar = X }) <:< (Foo { type Bar = X })
where `Foo` is a recursive type.
Before this commit, we would first try to check this by looking up `Bar`
in the `AndType` on the left, which means looking it up in both branches
and then merging the result, but the merge requires more subtyping
checks, which in turn require looking up a member inside an `AndType`,
seemingly ad infinitum.
We now avoid this by checking if either branch of the `AndType` on the left
is a subtype of the `RefinedType` on the right before looking up a member
in the `AndType` itself.
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions