diff options
author | Paul Phillips <paulp@improving.org> | 2012-01-25 10:16:17 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-01-25 10:16:17 -0800 |
commit | cbad2ec3b1a564efa7312c45cd40733bf292294b (patch) | |
tree | e5d01aa8e0ce17b26e91aa465d524a12788dd950 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | c9a2d079eabd1d6d143ef43d95d2cb93d1996bfc (diff) | |
parent | 3a09b7845c3b16906c9bea9b9deccc545b7a4cb7 (diff) | |
download | scala-cbad2ec3b1a564efa7312c45cd40733bf292294b.tar.gz scala-cbad2ec3b1a564efa7312c45cd40733bf292294b.tar.bz2 scala-cbad2ec3b1a564efa7312c45cd40733bf292294b.zip |
Merge remote-tracking branch 'odersky/topic/reflect' into develop
Conflicts:
src/compiler/scala/reflect/internal/Symbols.scala
src/compiler/scala/reflect/internal/Types.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/library/scala/reflect/api/Trees.scala
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index da7e54af5c..889c04a59b 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1404,7 +1404,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { assert(clazz != NoSymbol) reenterTypeParams(cdef.tparams) val tparams1 = cdef.tparams mapConserve (typedTypeDef) - val impl1 = typerReportAnyContextErrors(context.make(cdef.impl, clazz, new Scope)){ + val impl1 = typerReportAnyContextErrors(context.make(cdef.impl, clazz, newScope)) { _.typedTemplate(cdef.impl, parentTypes(cdef.impl)) } val impl2 = finishMethodSynthesis(impl1, clazz, context) @@ -1439,7 +1439,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { val clazz = mdef.symbol.moduleClass val typedMods = removeAnnotations(mdef.mods) assert(clazz != NoSymbol, mdef) - val impl1 = typerReportAnyContextErrors(context.make(mdef.impl, clazz, new Scope)){ + val impl1 = typerReportAnyContextErrors(context.make(mdef.impl, clazz, newScope)) { _.typedTemplate(mdef.impl, { parentTypes(mdef.impl) ++ ( if (linkedClass == NoSymbol || !linkedClass.isSerializable || clazz.isSerializable) Nil @@ -1448,7 +1448,8 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { List(TypeTree(SerializableClass.tpe) setPos clazz.pos.focus) } ) - })} + }) + } val impl2 = finishMethodSynthesis(impl1, clazz, context) treeCopy.ModuleDef(mdef, typedMods, mdef.name, impl2) setType NoType @@ -4043,7 +4044,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { val parents1 = templ.parents mapConserve (typedType(_, mode)) if (parents1 exists (_.isErrorTyped)) tree setType ErrorType else { - val decls = new Scope + val decls = newScope //Console.println("Owner: " + context.enclClass.owner + " " + context.enclClass.owner.id) val self = refinedType(parents1 map (_.tpe), context.enclClass.owner, decls, templ.pos) newTyper(context.make(templ, self.typeSymbol, decls)).typedRefinement(templ.body) |