aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t8017/value-class.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2015-05-23 17:58:16 +0200
committerGuillaume Martres <smarter@ubuntu.com>2015-05-23 18:59:54 +0200
commit3fa6782bbe54afeebb7fca229cebff271421f73a (patch)
treedb78538476afa3fed01a7a0395f56cbe873ab3d6 /tests/run/t8017/value-class.scala
parente61e59f739d889549993afdd743cbaf71a95c45e (diff)
downloaddotty-3fa6782bbe54afeebb7fca229cebff271421f73a.tar.gz
dotty-3fa6782bbe54afeebb7fca229cebff271421f73a.tar.bz2
dotty-3fa6782bbe54afeebb7fca229cebff271421f73a.zip
Fix bridge creation for value classes
As the comment in the code says: "In general, a bridge is needed when the signature of the closure method after Erasure contains an ErasedValueType but the corresponding type in the functional interface is not an ErasedValueType." So we need to check if _at least one_ of the type needs to be adapted, not if _all of them_ need to, the use of "forall" was an error.
Diffstat (limited to 'tests/run/t8017/value-class.scala')
-rw-r--r--tests/run/t8017/value-class.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/run/t8017/value-class.scala b/tests/run/t8017/value-class.scala
new file mode 100644
index 000000000..821239305
--- /dev/null
+++ b/tests/run/t8017/value-class.scala
@@ -0,0 +1,3 @@
+class C(val value: Int) extends AnyVal
+class D(val value: String) extends AnyVal
+class E[A](val value: A) extends AnyVal