aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-11-30 20:11:06 +0100
committerMartin Odersky <odersky@gmail.com>2015-12-06 16:09:19 +0100
commitcf794033ae42df0251fe2bc60051cb7dafb38023 (patch)
tree24042d59821315a6fb8ec399d03c6203d738ac6b /src/dotty/tools/dotc/core/Types.scala
parent7e63af3777c0ad5649d4ff60facbfdfa02b4b874 (diff)
downloaddotty-cf794033ae42df0251fe2bc60051cb7dafb38023.tar.gz
dotty-cf794033ae42df0251fe2bc60051cb7dafb38023.tar.bz2
dotty-cf794033ae42df0251fe2bc60051cb7dafb38023.zip
Drop requirement that an isRef type cannot be refined.
It seems to complciate things with no real purpose.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 2558dcbb7..61d9093bc 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -100,7 +100,7 @@ object Types {
case _ => false
}
- /** Is this type a (possibly aliased and/or partially applied) type reference
+ /** Is this type a (possibly refined or applied or aliased) type reference
* to the given type symbol?
* @sym The symbol to compare to. It must be a class symbol or abstract type.
* It makes no sense for it to be an alias type because isRef would always
@@ -113,8 +113,7 @@ object Types {
case _ => this1.symbol eq sym
}
case this1: RefinedType =>
- // make sure all refinements are type arguments
- this1.parent.isRef(sym) && this.argInfos.nonEmpty
+ this1.parent.isRef(sym)
case _ =>
false
}