diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-17 17:08:32 +0100 |
---|---|---|
committer | Tobias Schlatter <tobias@meisch.ch> | 2014-03-21 11:28:30 +0100 |
commit | 7820e62e30a63f2b8fd6b8bab8f96be6924a63a1 (patch) | |
tree | df75fe9f17d0945ffdb14656ab8096107f36fb3d /src | |
parent | 77d1c83ff67894bf87d37bfb8982d818fdc88f73 (diff) | |
download | dotty-7820e62e30a63f2b8fd6b8bab8f96be6924a63a1.tar.gz dotty-7820e62e30a63f2b8fd6b8bab8f96be6924a63a1.tar.bz2 dotty-7820e62e30a63f2b8fd6b8bab8f96be6924a63a1.zip |
Fix of t1056 - PartialFunction
type T was not recorgnized as a SAM type because a case was missing in zeroParamClass.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 9b5e02186..b6b17534e 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1774,7 +1774,7 @@ object Types { // upper bound is not a singleton type, widen the instance. if (fromBelow && isSingleton(inst) && !isSingleton(upperBound)) inst = inst.widen - + inst = inst.simplified // 2. If instance is from below and is a fully-defined union type, yet upper bound @@ -1782,7 +1782,7 @@ object Types { // of all common base types. if (fromBelow && isOrType(inst) && isFullyDefined(inst) && !isOrType(upperBound)) inst = inst.approximateUnion - + instantiateWith(inst) } @@ -2094,6 +2094,8 @@ object Types { zeroParamClass(tp.underlying) case tp: RefinedType => zeroParamClass(tp.underlying) + case tp: TypeBounds => + zeroParamClass(tp.underlying) case tp: TypeVar => zeroParamClass(tp.underlying) case _ => |