diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2015-07-09 18:01:55 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2015-07-09 18:01:55 +1000 |
commit | 8a5aa6ee74eff54660984078839cea2c2be11116 (patch) | |
tree | c0b464344377d2e73ce3ea78179c2bfb17ebeb7f /test/files | |
parent | 057664807902aeab50e399455d7c7917e9a6d071 (diff) | |
parent | 3bca6a23802adeb74b9524d0f80a0691fdaba441 (diff) | |
download | scala-8a5aa6ee74eff54660984078839cea2c2be11116.tar.gz scala-8a5aa6ee74eff54660984078839cea2c2be11116.tar.bz2 scala-8a5aa6ee74eff54660984078839cea2c2be11116.zip |
Merge pull request #4617 from retronym/ticket/9387
SI-9387 Fix VerifyError introduced by indylambda
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t9387.scala | 20 | ||||
-rw-r--r-- | test/files/run/t9387b.check | 1 | ||||
-rw-r--r-- | test/files/run/t9387b.scala | 16 |
3 files changed, 37 insertions, 0 deletions
diff --git a/test/files/run/t9387.scala b/test/files/run/t9387.scala new file mode 100644 index 0000000000..3e33d19fd2 --- /dev/null +++ b/test/files/run/t9387.scala @@ -0,0 +1,20 @@ +class G[T] +object G { + def v[T](x: T): G[T] = null +} + +class A[T] +object A { + def apply[T](x: => G[T]): A[T] = null +} + +object T { + A[Unit](G.v(() => ())) // Was VerifyError +} + +object Test { + def main(args: Array[String]): Unit = { + T + } + +}
\ No newline at end of file diff --git a/test/files/run/t9387b.check b/test/files/run/t9387b.check new file mode 100644 index 0000000000..6a452c185a --- /dev/null +++ b/test/files/run/t9387b.check @@ -0,0 +1 @@ +() diff --git a/test/files/run/t9387b.scala b/test/files/run/t9387b.scala new file mode 100644 index 0000000000..6339f4caba --- /dev/null +++ b/test/files/run/t9387b.scala @@ -0,0 +1,16 @@ +object T { + val f: Unit = () => () + println(f) +} + +object U { + def f[T](t: T): T = t + f[Unit](() => ()) +} + +object Test { + def main(args: Array[String]): Unit = { + T + U + } +} |