diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-11-25 14:33:25 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-11-25 14:33:25 -0800 |
commit | 5f21394cd42dbd93e34320e09403cd66bdad3a96 (patch) | |
tree | e77e5be48543793c2e5826c5cbb3aa215ddc184a /test/files/run/delambdafy-dependent-on-param-subst-2.scala | |
parent | 247828ed0dfb7daedf60dafb7413537c788848a0 (diff) | |
parent | 5d5596bb07c0b5985fe9a6ba5433a3d463918b28 (diff) | |
download | scala-5f21394cd42dbd93e34320e09403cd66bdad3a96.tar.gz scala-5f21394cd42dbd93e34320e09403cd66bdad3a96.tar.bz2 scala-5f21394cd42dbd93e34320e09403cd66bdad3a96.zip |
Merge pull request #3165 from retronym/ticket/uncurry-tidy-2
Unifying -Ydelambdafy:{inline, method}
Diffstat (limited to 'test/files/run/delambdafy-dependent-on-param-subst-2.scala')
-rw-r--r-- | test/files/run/delambdafy-dependent-on-param-subst-2.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/run/delambdafy-dependent-on-param-subst-2.scala b/test/files/run/delambdafy-dependent-on-param-subst-2.scala new file mode 100644 index 0000000000..7b6fc597e8 --- /dev/null +++ b/test/files/run/delambdafy-dependent-on-param-subst-2.scala @@ -0,0 +1,20 @@ +trait M[-X] { + def m(x: X): Boolean +} + +class C +class A { class C } + +object Test { + def main(args: Array[String]) { + val a = new A + + // class O extends M[a.C] { def m(x: a.C) = true } + // (new O: M[Null]).m(null) // Okay + + ((a: A) => { + class N extends M[a.C] { def m(x: a.C) = true } + new N: M[Null] + }).apply(a).m(null) // NPE, missing bridge + } +} |