diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t5878.check | 13 | ||||
-rw-r--r-- | test/files/neg/t5878.scala | 6 | ||||
-rw-r--r-- | test/files/run/rawstrings.check | 1 | ||||
-rw-r--r-- | test/files/run/rawstrings.scala | 3 |
4 files changed, 23 insertions, 0 deletions
diff --git a/test/files/neg/t5878.check b/test/files/neg/t5878.check new file mode 100644 index 0000000000..50dba0d272 --- /dev/null +++ b/test/files/neg/t5878.check @@ -0,0 +1,13 @@ +t5878.scala:1: error: value class may not unbox to itself +case class Foo(x: Bar) extends AnyVal + ^ +t5878.scala:2: error: value class may not unbox to itself +case class Bar(x: Foo) extends AnyVal + ^ +t5878.scala:4: error: value class may not unbox to itself +class Foo1(val x: Bar1) extends AnyVal + ^ +t5878.scala:5: error: value class may not unbox to itself +class Bar1(val x: Foo1) extends AnyVal + ^ +four errors found diff --git a/test/files/neg/t5878.scala b/test/files/neg/t5878.scala new file mode 100644 index 0000000000..b4e33627ef --- /dev/null +++ b/test/files/neg/t5878.scala @@ -0,0 +1,6 @@ +case class Foo(x: Bar) extends AnyVal +case class Bar(x: Foo) extends AnyVal + +class Foo1(val x: Bar1) extends AnyVal +class Bar1(val x: Foo1) extends AnyVal + diff --git a/test/files/run/rawstrings.check b/test/files/run/rawstrings.check new file mode 100644 index 0000000000..36e63594df --- /dev/null +++ b/test/files/run/rawstrings.check @@ -0,0 +1 @@ +[\n\t'"$] diff --git a/test/files/run/rawstrings.scala b/test/files/run/rawstrings.scala new file mode 100644 index 0000000000..9df64f6625 --- /dev/null +++ b/test/files/run/rawstrings.scala @@ -0,0 +1,3 @@ +object Test extends App { + println(raw"[\n\t'${'"'}$$]") +} |