From 223fa2bea328fc53f87d6f9d0c28c67545e831af Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 18 Dec 2014 15:39:55 +0100 Subject: More careful usage of unforced decls in classes. 1) Rename `decls` to `unforcedDecls` to make it clear that it is danegrous to use. 2) Prefer `info.decls` over `unforcedDecls`. This fixes the problem reported in #305 where the primary constructor was not found. --- src/dotty/tools/dotc/core/Types.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/Types.scala') diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index a1ca7796f..5862a934a 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -895,7 +895,7 @@ object Types { * no symbol it tries `member` as an alternative. */ def typeParamNamed(name: TypeName)(implicit ctx: Context): Symbol = - classSymbol.decls.lookup(name) orElse member(name).symbol + classSymbol.unforcedDecls.lookup(name) orElse member(name).symbol /** If this is a prototype with some ignored component, reveal one more * layer of it. Otherwise the type itself. -- cgit v1.2.3