From a884556d910b333f6d550ef7624c100d476862b7 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 22 Apr 2015 16:19:58 +0200 Subject: Anchor import symbols at current owner Needed to harmonize behavior of Typer/Namer and tpd. This is needed for making pickling, then unpickling the identity. --- src/dotty/tools/dotc/core/Symbols.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/core/Symbols.scala') diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index b482dcae4..bce0a5450 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -228,8 +228,8 @@ trait Symbols { this: Context => newSymbol(cls, nme.localDummyName(cls), EmptyFlags, NoType) /** Create an import symbol pointing back to given qualifier `expr`. */ - def newImportSymbol(expr: Tree, coord: Coord = NoCoord) = - newSymbol(NoSymbol, nme.IMPORT, EmptyFlags, ImportType(expr), coord = coord) + def newImportSymbol(owner: Symbol, expr: Tree, coord: Coord = NoCoord) = + newSymbol(owner, nme.IMPORT, EmptyFlags, ImportType(expr), coord = coord) /** Create a class constructor symbol for given class `cls`. */ def newConstructor(cls: ClassSymbol, flags: FlagSet, paramNames: List[TermName], paramTypes: List[Type], privateWithin: Symbol = NoSymbol, coord: Coord = NoCoord) = -- cgit v1.2.3