summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-09-13 14:05:03 -0700
committerPaul Phillips <paulp@improving.org>2013-09-13 15:03:12 -0700
commit55c6fd40702244e1835581a67103efdd2fd93dd4 (patch)
tree19f2975af8981a720f86a5d0777405d73e7ad23b
parent671e6e03c7e096eda0c27262ae8605fa7af76f59 (diff)
downloadscala-55c6fd40702244e1835581a67103efdd2fd93dd4.tar.gz
scala-55c6fd40702244e1835581a67103efdd2fd93dd4.tar.bz2
scala-55c6fd40702244e1835581a67103efdd2fd93dd4.zip
Widen type of outer accessor.
This is the key ingredient so TypeTree(sym) can resist widening the type.
-rw-r--r--src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala2
-rw-r--r--test/files/run/compiler-asSeenFrom.check4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
index d6a6e027cb..533bfa95df 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)
+ sym setInfo MethodType(Nil, restpe.widen)
}
def newOuterField(clazz: Symbol) = {
val accFlags = SYNTHETIC | ARTIFACT | PARAMACCESSOR | ( if (clazz.isEffectivelyFinal) PrivateLocal else PROTECTED )
diff --git a/test/files/run/compiler-asSeenFrom.check b/test/files/run/compiler-asSeenFrom.check
index 7305504115..a1826c2784 100644
--- a/test/files/run/compiler-asSeenFrom.check
+++ b/test/files/run/compiler-asSeenFrom.check
@@ -363,8 +363,8 @@ value jZ { // after parser
value jZ { // after explicitouter
protected val $outer: D.this.type
- val $outer(): D.this.type
- val $outer(): C.this.type
+ val $outer(): ll.D[T3]
+ val $outer(): ll.C[T1]
def thisI(): I.this.type
def thisC(): C.this.type
def t2(): T2