From ea640a32264cb78efbf267d5c2be89e3e99dcccf Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 19 Jul 2013 16:11:10 +0200 Subject: Additions needed to support implicits. Still to do: - properly account for bounded wildcard types - set up scheme for nested diagnostics buffers. --- src/dotty/tools/dotc/typer/Namer.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/typer/Namer.scala') diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala index 43589aac5..56469e604 100644 --- a/src/dotty/tools/dotc/typer/Namer.scala +++ b/src/dotty/tools/dotc/typer/Namer.scala @@ -4,7 +4,7 @@ package typer import core._ import ast._ -import Trees._, Constants._, StdNames._, Scopes._ +import Trees._, Constants._, StdNames._, Scopes._, Denotations._ import Contexts._, Symbols._, Types._, SymDenotations._, Names._, NameOps._, Flags._, Decorators._ import ast.desugar, ast.desugar._ import util.Positions._ @@ -22,6 +22,10 @@ trait NamerContextOps { this: Context => } sym } + + def lookup(name: Name): PreDenotation = + if (isClassDefContext) owner.asClass.membersNamed(name) + else scope.denotsNamed(name) } /** This class attaches creates symbols from definitions and imports and gives them -- cgit v1.2.3