diff options
author | Dmitry Petrashko <dark@d-d.me> | 2015-05-04 19:00:12 +0200 |
---|---|---|
committer | Dmitry Petrashko <dark@d-d.me> | 2015-05-04 19:00:12 +0200 |
commit | 61ddff45164aa23a06c255596c1c2d53cdf0e76c (patch) | |
tree | 07228e018da1a63200a9c7875ee0f728c4b348a9 /tests/pos | |
parent | 3b3a51f793c8fb65f94c121c1dcc2ce3aa0afb39 (diff) | |
parent | e8f32243cf25656f1ffc751d48bb792f73219e95 (diff) | |
download | dotty-61ddff45164aa23a06c255596c1c2d53cdf0e76c.tar.gz dotty-61ddff45164aa23a06c255596c1c2d53cdf0e76c.tar.bz2 dotty-61ddff45164aa23a06c255596c1c2d53cdf0e76c.zip |
Merge pull request #532 from smarter/fix/vc-java-compat
Fix compatibility of Java with value classes
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/valueclasses/t9298/JUse.java | 7 | ||||
-rw-r--r-- | tests/pos/valueclasses/t9298/Meter.scala | 3 | ||||
-rw-r--r-- | tests/pos/valueclasses/t9298/Use.scala | 9 |
3 files changed, 19 insertions, 0 deletions
diff --git a/tests/pos/valueclasses/t9298/JUse.java b/tests/pos/valueclasses/t9298/JUse.java new file mode 100644 index 000000000..a872c895a --- /dev/null +++ b/tests/pos/valueclasses/t9298/JUse.java @@ -0,0 +1,7 @@ +package t9298; + +class JUse { + public static Meter jm() { + return new Meter(2); + } +} diff --git a/tests/pos/valueclasses/t9298/Meter.scala b/tests/pos/valueclasses/t9298/Meter.scala new file mode 100644 index 000000000..290b28509 --- /dev/null +++ b/tests/pos/valueclasses/t9298/Meter.scala @@ -0,0 +1,3 @@ +package t9298 + +class Meter(val x: Int) extends AnyVal diff --git a/tests/pos/valueclasses/t9298/Use.scala b/tests/pos/valueclasses/t9298/Use.scala new file mode 100644 index 000000000..41f1fb035 --- /dev/null +++ b/tests/pos/valueclasses/t9298/Use.scala @@ -0,0 +1,9 @@ +// TODO: this should be a run test once we have run tests + +package t9298 + +object Use { + def main(args: Array[String]): Unit = { + val x: Meter = JUse.jm + } +} |