aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-17 18:19:38 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-17 18:19:38 +0100
commit8b0eb728edffac611470bd1db0bc2f7a9cec2ce0 (patch)
tree12531e77366ddab1455c40b3a6a3ee04fb27aef6 /src/dotty/tools/dotc/core/Types.scala
parent0c45788cc806250eca72c96a186ed8961f77404e (diff)
downloaddotty-8b0eb728edffac611470bd1db0bc2f7a9cec2ce0.tar.gz
dotty-8b0eb728edffac611470bd1db0bc2f7a9cec2ce0.tar.bz2
dotty-8b0eb728edffac611470bd1db0bc2f7a9cec2ce0.zip
Made findDecl more forgiving
Will return NoDenotation for types that do not have decls, analogous to findMember.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 6e3ccaf8c..9d6faef75 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -333,6 +333,8 @@ object Types {
tp.underlying.findDecl(name, excluded)
case ErrorType =>
ctx.newErrorSymbol(classSymbol orElse defn.RootClass, name)
+ case _ =>
+ NoDenotation
}
/** The member of this type with the given name */
@@ -1404,7 +1406,7 @@ object Types {
def derivedAndOrType(tp1: Type, tp2: Type)(implicit ctx: Context): AndOrType =
derivedAndType(tp1, tp2)
-
+
override def computeHash = doHash(tp1, tp2)
}