diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-06-06 13:33:53 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-06-06 13:33:53 +1000 |
commit | 361f3f1540c755e36aaed22484924bb44eabc83b (patch) | |
tree | 267d174bf072dcc1a40faf7f6a7c91dcec690466 /test/files/run | |
parent | af93c7a147156f69cad78cc80a36aeaeb89cbe0c (diff) | |
parent | 3f685073923d76de08ffdba78075f2267ee56133 (diff) | |
download | scala-361f3f1540c755e36aaed22484924bb44eabc83b.tar.gz scala-361f3f1540c755e36aaed22484924bb44eabc83b.tar.bz2 scala-361f3f1540c755e36aaed22484924bb44eabc83b.zip |
Merge pull request #5157 from retronym/topic/lambda-statics
Lambda impl methods static and more stably named
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/delambdafy_t6028.check | 8 | ||||
-rw-r--r-- | test/files/run/delambdafy_t6555.check | 4 | ||||
-rw-r--r-- | test/files/run/delambdafy_uncurry_byname_method.check | 4 | ||||
-rw-r--r-- | test/files/run/delambdafy_uncurry_method.check | 4 | ||||
-rw-r--r-- | test/files/run/t9097.scala | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/test/files/run/delambdafy_t6028.check b/test/files/run/delambdafy_t6028.check index b90dea62ed..8b0ae7e9b9 100644 --- a/test/files/run/delambdafy_t6028.check +++ b/test/files/run/delambdafy_t6028.check @@ -11,7 +11,7 @@ package <empty> { def foo(methodParam: String): Function0 = { val methodLocal: String = ""; { - (() => T.this.$anonfun$1(methodParam, methodLocal)) + (() => T.this.$anonfun$foo$1(methodParam, methodLocal)) } }; def bar(barParam: String): Object = { @@ -21,10 +21,10 @@ package <empty> { def tryy(tryyParam: String): Function0 = { var tryyLocal: runtime.ObjectRef = scala.runtime.ObjectRef.create(""); { - (() => T.this.$anonfun$2(tryyParam, tryyLocal)) + (() => T.this.$anonfun$tryy$1(tryyParam, tryyLocal)) } }; - final <artifact> private[this] def $anonfun$1(methodParam$1: String, methodLocal$1: String): String = T.this.classParam.+(T.this.field()).+(methodParam$1).+(methodLocal$1); + final <artifact> private[this] def $anonfun$foo$1(methodParam$1: String, methodLocal$1: String): String = T.this.classParam.+(T.this.field()).+(methodParam$1).+(methodLocal$1); abstract trait MethodLocalTrait$1 extends Object { def /*MethodLocalTrait$1*/$init$(barParam$1: String): Unit = { () @@ -54,7 +54,7 @@ package <empty> { T.this.MethodLocalObject$lzycompute$1(barParam$1, MethodLocalObject$module$1) else MethodLocalObject$module$1.elem.$asInstanceOf[T#MethodLocalObject$2.type](); - final <artifact> private[this] def $anonfun$2(tryyParam$1: String, tryyLocal$1: runtime.ObjectRef): Unit = try { + final <artifact> private[this] def $anonfun$tryy$1(tryyParam$1: String, tryyLocal$1: runtime.ObjectRef): Unit = try { tryyLocal$1.elem = tryyParam$1 } finally () } diff --git a/test/files/run/delambdafy_t6555.check b/test/files/run/delambdafy_t6555.check index b6ccebde78..d8b834edc7 100644 --- a/test/files/run/delambdafy_t6555.check +++ b/test/files/run/delambdafy_t6555.check @@ -6,8 +6,8 @@ package <empty> { () }; private[this] val f: String => String = { - final <artifact> def $anonfun(param: String): String = param; - ((param: String) => $anonfun(param)) + final <artifact> def $anonfun$f(param: String): String = param; + ((param: String) => $anonfun$f(param)) }; <stable> <accessor> def f(): String => String = Foo.this.f } diff --git a/test/files/run/delambdafy_uncurry_byname_method.check b/test/files/run/delambdafy_uncurry_byname_method.check index e0f281b1cd..71e404ce64 100644 --- a/test/files/run/delambdafy_uncurry_byname_method.check +++ b/test/files/run/delambdafy_uncurry_byname_method.check @@ -7,8 +7,8 @@ package <empty> { }; def bar(x: () => String): String = x.apply(); def foo(): String = Foo.this.bar({ - final <artifact> def $anonfun(): String = ""; - (() => $anonfun()) + final <artifact> def $anonfun$foo(): String = ""; + (() => $anonfun$foo()) }) } } diff --git a/test/files/run/delambdafy_uncurry_method.check b/test/files/run/delambdafy_uncurry_method.check index 5ee3d174b3..8aa0b92054 100644 --- a/test/files/run/delambdafy_uncurry_method.check +++ b/test/files/run/delambdafy_uncurry_method.check @@ -7,8 +7,8 @@ package <empty> { }; def bar(): Unit = { val f: Int => Int = { - final <artifact> def $anonfun(x: Int): Int = x.+(1); - ((x: Int) => $anonfun(x)) + final <artifact> def $anonfun|(x: Int): Int = x.+(1); + ((x: Int) => $anonfun|(x)) }; () } diff --git a/test/files/run/t9097.scala b/test/files/run/t9097.scala index 49c0bbe79a..49c9e2f2e5 100644 --- a/test/files/run/t9097.scala +++ b/test/files/run/t9097.scala @@ -28,6 +28,6 @@ object Test extends StoreReporterDirectTest { assert(!storeReporter.hasErrors, message = filteredInfos map (_.msg) mkString "; ") val out = baos.toString("UTF-8") // was 2 before the fix, the two PackageDefs for a would both contain the ClassDef for the closure - assert(out.lines.count(_ contains "def $anonfun$1(x$1: Int): String") == 1, out) + assert(out.lines.count(_ contains "def $anonfun$hihi$1(x$1: Int): String") == 1, out) } } |