summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-01-25 10:16:17 -0800
committerPaul Phillips <paulp@improving.org>2012-01-25 10:16:17 -0800
commitcbad2ec3b1a564efa7312c45cd40733bf292294b (patch)
treee5d01aa8e0ce17b26e91aa465d524a12788dd950 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentc9a2d079eabd1d6d143ef43d95d2cb93d1996bfc (diff)
parent3a09b7845c3b16906c9bea9b9deccc545b7a4cb7 (diff)
downloadscala-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.scala9
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)