summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-09-18 07:25:59 -0700
committerPaul Phillips <paulp@improving.org>2013-09-18 07:25:59 -0700
commita8543ef28f8fc0152208f4eef763344657bf9e5a (patch)
treec82662e321ec6c291edbd51e30ff93bc6d93ce92 /src/compiler
parentd45a3c8cc8e9f1d95d797d548a85abd8597f5bc7 (diff)
parent0f67e8dddcb8b087560fed90339d9235179dd1ea (diff)
downloadscala-a8543ef28f8fc0152208f4eef763344657bf9e5a.tar.gz
scala-a8543ef28f8fc0152208f4eef763344657bf9e5a.tar.bz2
scala-a8543ef28f8fc0152208f4eef763344657bf9e5a.zip
Merge pull request #2955 from retronym/ticket/7853
SI-7853 Regression in explicit outer
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala9
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
2 files changed, 5 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
index a2bf5bf9e5..540b8f6c6c 100644
--- a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
+++ b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
@@ -90,7 +90,7 @@ abstract class ExplicitOuter extends InfoTransform
sym expandName clazz
sym.referenced = clazz
- sym setInfo MethodType(Nil, restpe.widen)
+ sym setInfo MethodType(Nil, restpe)
}
def newOuterField(clazz: Symbol) = {
val accFlags = SYNTHETIC | ARTIFACT | PARAMACCESSOR | ( if (clazz.isEffectivelyFinal) PrivateLocal else PROTECTED )
@@ -361,10 +361,9 @@ abstract class ExplicitOuter extends InfoTransform
/** The definition tree of the outer accessor of current class
*/
def outerAccessorDef: Tree = localTyper typed {
- outerAccessor(currentClass) match {
- case acc if acc.isDeferred => DefDef(acc, EmptyTree)
- case acc => DefDef(acc, Select(This(currentClass), outerField(currentClass)))
- }
+ val acc = outerAccessor(currentClass)
+ val rhs = if (acc.isDeferred) EmptyTree else Select(This(currentClass), outerField(currentClass))
+ DefDef(acc, rhs)
}
/** The definition tree of the outer accessor for class mixinClass.
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 3ac0b398ee..55268b1e1a 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2606,7 +2606,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
}
val rhs = methodBodyTyper.virtualizedMatch(match_, mode, B1.tpe)
- val defdef = newDefDef(methodSym, rhs)(vparamss = mapParamss(methodSym)(newParam))
+ val defdef = newDefDef(methodSym, rhs)(vparamss = mapParamss(methodSym)(newParam), tpt = TypeTree(B1.tpe))
(defdef, matchResTp)
}