summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/t9298/Test.java7
-rw-r--r--test/files/run/t9298/VC.scala5
-rw-r--r--test/files/run/t9298b/Test.java7
-rw-r--r--test/files/run/t9298b/VC.scala8
4 files changed, 27 insertions, 0 deletions
diff --git a/test/files/run/t9298/Test.java b/test/files/run/t9298/Test.java
new file mode 100644
index 0000000000..81f5265985
--- /dev/null
+++ b/test/files/run/t9298/Test.java
@@ -0,0 +1,7 @@
+public class Test {
+ public void consume(VC vc) {}
+
+ public static void main(String[] args) {
+ new Client().test();
+ }
+}
diff --git a/test/files/run/t9298/VC.scala b/test/files/run/t9298/VC.scala
new file mode 100644
index 0000000000..916e62dc59
--- /dev/null
+++ b/test/files/run/t9298/VC.scala
@@ -0,0 +1,5 @@
+class VC(val s: String) extends AnyVal
+
+class Client {
+ def test = new Test().consume(new VC(""))
+}
diff --git a/test/files/run/t9298b/Test.java b/test/files/run/t9298b/Test.java
new file mode 100644
index 0000000000..f369b26f36
--- /dev/null
+++ b/test/files/run/t9298b/Test.java
@@ -0,0 +1,7 @@
+public class Test {
+ public VC identity(VC vc) { return vc; }
+
+ public static void main(String[] args) {
+ new Client().test();
+ }
+}
diff --git a/test/files/run/t9298b/VC.scala b/test/files/run/t9298b/VC.scala
new file mode 100644
index 0000000000..bb5978b6e4
--- /dev/null
+++ b/test/files/run/t9298b/VC.scala
@@ -0,0 +1,8 @@
+class VC(val s: Int) extends AnyVal
+
+class Client {
+ def test = {
+ val vc: VC = new Test().identity(new VC(42))
+ assert(vc.s == 42)
+ }
+}