diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2015-07-11 01:35:54 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2015-07-11 01:52:36 +0200 |
commit | 0efa171e8ccca0d49fc6d800fd21e29f7b7336fd (patch) | |
tree | 0a135f3b4c7fbe0d3dd29b2f00edd5c62c88d16b /src/dotty/tools/dotc/core/Types.scala | |
parent | b82313268b912c62f9ddc89fefd02be96f2de64c (diff) | |
download | dotty-0efa171e8ccca0d49fc6d800fd21e29f7b7336fd.tar.gz dotty-0efa171e8ccca0d49fc6d800fd21e29f7b7336fd.tar.bz2 dotty-0efa171e8ccca0d49fc6d800fd21e29f7b7336fd.zip |
Don't add lower bounds of abstract types to the implicit scope
As the spec[1] says:
"The parts of a type T are [...] if T is an abstract type, the parts of
its upper bound;"
[1]: http://www.scala-lang.org/files/archive/spec/2.11/07-implicits.html#implicit-parameters
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 61ab1133b..4d6a7e22b 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -3118,6 +3118,8 @@ object Types { apply(foldOver(maybeAdd(x, tp), tp), tp.underlying) case tp: TypeRef => foldOver(maybeAdd(x, tp), tp) + case TypeBounds(_, hi) => + apply(x, hi) case tp: ThisType => apply(x, tp.underlying) case tp: ConstantType => |