From 8b0eb728edffac611470bd1db0bc2f7a9cec2ce0 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 17 Jan 2014 18:19:38 +0100 Subject: Made findDecl more forgiving Will return NoDenotation for types that do not have decls, analogous to findMember. --- src/dotty/tools/dotc/core/Types.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) } -- cgit v1.2.3