diff options
author | Paul Phillips <paulp@improving.org> | 2013-03-25 11:03:25 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-03-25 11:03:25 -0700 |
commit | 98daf03a902e9af902870448f9de17ff140d9bca (patch) | |
tree | 34557b2cc0f7aba376a38e2ee5d76ddd4e55f2d9 /test/files | |
parent | 1187c9896c097e6e591e5655b35f52c06b3c900a (diff) | |
download | scala-98daf03a902e9af902870448f9de17ff140d9bca.tar.gz scala-98daf03a902e9af902870448f9de17ff140d9bca.tar.bz2 scala-98daf03a902e9af902870448f9de17ff140d9bca.zip |
Overhauled local/getter/setter name logic.
Sifted through extraneous methods trying to find consistency,
consolidating and deprecating as I went. The original motivation
for all this was the restoration of LOCAL_SUFFIX to originalName,
because:
It looks like in an attempt to make originalName print
consistently with decodedName, I went a little too far and
stripped invisible trailing spaces from originalName. This
meant outer fields would have an originalName of '$outer'
instead of '$outer ', which in turn could have caused them to
be mis-recognized as outer accessors, because the logic of
outerSource hinges upon "originalName == nme.OUTER".
I don't know if this affected anything - I noticed it by
inspection, improbably enough.
Deprecated originalName - original, compared to what? - in
favor of unexpandedName, which has a more obvious complement.
Introduced string_== for the many spots where people have
given up and are comparing string representations of names.
A light dusting of types is still better than nothing.
Editoral note: LOCAL_SUFFIX is the worst. Significant trailing
whitespace! It's a time bomb.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/existentials3-new.check | 6 | ||||
-rw-r--r-- | test/files/run/t6028.check | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/test/files/run/existentials3-new.check b/test/files/run/existentials3-new.check index 8f7dd701ac..c0233d2267 100644 --- a/test/files/run/existentials3-new.check +++ b/test/files/run/existentials3-new.check @@ -12,9 +12,9 @@ List[Seq[Int]], t=TypeRef, s=class List List[Seq[U forSome { type U <: Int }]], t=TypeRef, s=class List Bar.type, t=TypeRef, s=type Bar.type Bar, t=TypeRef, s=type Bar -Test.ToS, t=RefinedType, s=g3 -Test.ToS, t=RefinedType, s=g4 -Test.ToS, t=RefinedType, s=g5 +Test.ToS, t=RefinedType, s=g3 +Test.ToS, t=RefinedType, s=g4 +Test.ToS, t=RefinedType, s=g5 () => Test.ToS, t=TypeRef, s=trait Function0 () => Test.ToS, t=TypeRef, s=trait Function0 $anon, t=TypeRef, s=type $anon diff --git a/test/files/run/t6028.check b/test/files/run/t6028.check index 67c30e35c6..2ec639fce2 100644 --- a/test/files/run/t6028.check +++ b/test/files/run/t6028.check @@ -1,7 +1,7 @@ [[syntax trees at end of lambdalift]] // newSource1 package <empty> { class T extends Object { - <paramaccessor> val T$$classParam: Int = _; + <paramaccessor> val classParam: Int = _; def <init>(classParam: Int): T = { T.super.<init>(); () @@ -30,15 +30,15 @@ package <empty> { () }; final def apply(): Int = $anonfun$foo$1.this.apply$mcI$sp(); - <specialized> def apply$mcI$sp(): Int = $anonfun$foo$1.this.$outer.T$$classParam.+($anonfun$foo$1.this.$outer.field()).+($anonfun$foo$1.this.methodParam$1).+($anonfun$foo$1.this.methodLocal$1); + <specialized> def apply$mcI$sp(): Int = $anonfun$foo$1.this.$outer.classParam.+($anonfun$foo$1.this.$outer.field()).+($anonfun$foo$1.this.methodParam$1).+($anonfun$foo$1.this.methodLocal$1); <synthetic> <paramaccessor> <artifact> private[this] val $outer: T = _; - <synthetic> <stable> <artifact> def T$$anonfun$$$outer(): T = $anonfun$foo$1.this.$outer; + <synthetic> <stable> <artifact> def $outer(): T = $anonfun$foo$1.this.$outer; final <bridge> <artifact> def apply(): Object = scala.Int.box($anonfun$foo$1.this.apply()); <synthetic> <paramaccessor> private[this] val methodParam$1: Int = _; <synthetic> <paramaccessor> private[this] val methodLocal$1: Int = _ }; abstract trait MethodLocalTrait$1 extends Object { - <synthetic> <stable> <artifact> def T$MethodLocalTrait$$$outer(): T + <synthetic> <stable> <artifact> def $outer(): T }; object MethodLocalObject$2 extends Object with T#MethodLocalTrait$1 { def <init>($outer: T, barParam$1: Int): T#MethodLocalObject$2.type = { @@ -47,8 +47,8 @@ package <empty> { () }; <synthetic> <paramaccessor> <artifact> private[this] val $outer: T = _; - <synthetic> <stable> <artifact> def T$MethodLocalObject$$$outer(): T = MethodLocalObject$2.this.$outer; - <synthetic> <stable> <artifact> def T$MethodLocalTrait$$$outer(): T = MethodLocalObject$2.this.$outer + <synthetic> <stable> <artifact> def $outer(): T = MethodLocalObject$2.this.$outer; + <synthetic> <stable> <artifact> def $outer(): T = MethodLocalObject$2.this.$outer }; final <stable> private[this] def MethodLocalObject$1(barParam$1: Int, MethodLocalObject$module$1: runtime.VolatileObjectRef): T#MethodLocalObject$2.type = { MethodLocalObject$module$1.elem = new T#MethodLocalObject$2.type(T.this, barParam$1); @@ -70,7 +70,7 @@ package <empty> { $anonfun$tryy$1.this.tryyLocal$1.elem = $anonfun$tryy$1.this.tryyParam$1 } finally (); <synthetic> <paramaccessor> <artifact> private[this] val $outer: T = _; - <synthetic> <stable> <artifact> def T$$anonfun$$$outer(): T = $anonfun$tryy$1.this.$outer; + <synthetic> <stable> <artifact> def $outer(): T = $anonfun$tryy$1.this.$outer; final <bridge> <artifact> def apply(): Object = { $anonfun$tryy$1.this.apply(); scala.runtime.BoxedUnit.UNIT |