diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t2038.scala | 5 | ||||
-rw-r--r-- | test/files/pos/t5031/Id.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t5031/package.scala | 3 | ||||
-rw-r--r-- | test/files/pos/t5031_2.scala | 7 | ||||
-rw-r--r-- | test/files/pos/t5706.scala | 2 | ||||
-rw-r--r-- | test/files/pos/t5897.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t5897.scala | 6 | ||||
-rw-r--r-- | test/files/pos/t5930.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t5930.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t6047.scala | 2 |
10 files changed, 33 insertions, 2 deletions
diff --git a/test/files/pos/t2038.scala b/test/files/pos/t2038.scala new file mode 100644 index 0000000000..17b1a702dd --- /dev/null +++ b/test/files/pos/t2038.scala @@ -0,0 +1,5 @@ +class Test { + List(Some(classOf[java.lang.Integer]), Some(classOf[Int])).map { + case Some(f: Class[_]) => f.cast(???) + } +}
\ No newline at end of file diff --git a/test/files/pos/t5031/Id.scala b/test/files/pos/t5031/Id.scala new file mode 100644 index 0000000000..7bc3ebd348 --- /dev/null +++ b/test/files/pos/t5031/Id.scala @@ -0,0 +1,4 @@ +package t5031 + +object ID + diff --git a/test/files/pos/t5031/package.scala b/test/files/pos/t5031/package.scala new file mode 100644 index 0000000000..c02e69db8e --- /dev/null +++ b/test/files/pos/t5031/package.scala @@ -0,0 +1,3 @@ +package object t5031 { + type ID = Int +} diff --git a/test/files/pos/t5031_2.scala b/test/files/pos/t5031_2.scala new file mode 100644 index 0000000000..ded3e82301 --- /dev/null +++ b/test/files/pos/t5031_2.scala @@ -0,0 +1,7 @@ +package object t5031 { + class ID +} + +package t5031 { + object ID +} diff --git a/test/files/pos/t5706.scala b/test/files/pos/t5706.scala index 847acb693f..20a8b255cc 100644 --- a/test/files/pos/t5706.scala +++ b/test/files/pos/t5706.scala @@ -1,4 +1,4 @@ -import scala.reflect.makro.Context +import scala.reflect.macros.Context class Logger { def error(message: String) = macro Impls.error diff --git a/test/files/pos/t5897.flags b/test/files/pos/t5897.flags new file mode 100644 index 0000000000..e8fb65d50c --- /dev/null +++ b/test/files/pos/t5897.flags @@ -0,0 +1 @@ +-Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t5897.scala b/test/files/pos/t5897.scala new file mode 100644 index 0000000000..2e9751afe0 --- /dev/null +++ b/test/files/pos/t5897.scala @@ -0,0 +1,6 @@ +// no warning here +// (strangely, if there's an unreachable code warning *anywhere in this compilation unit*, +// the non-sensical warning goes away under -Xfatal-warnings) +class Test { + () match { case () => } +} diff --git a/test/files/pos/t5930.flags b/test/files/pos/t5930.flags new file mode 100644 index 0000000000..c7d406c649 --- /dev/null +++ b/test/files/pos/t5930.flags @@ -0,0 +1 @@ +-Ywarn-dead-code -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/pos/t5930.scala b/test/files/pos/t5930.scala new file mode 100644 index 0000000000..de9d62cfe8 --- /dev/null +++ b/test/files/pos/t5930.scala @@ -0,0 +1,4 @@ +// should not warn about dead code (`matchEnd(throw new MatchError)`) + class Test { + 0 match { case x: Int => } +}
\ No newline at end of file diff --git a/test/files/pos/t6047.scala b/test/files/pos/t6047.scala index 66b52b285f..edabb95ee3 100644 --- a/test/files/pos/t6047.scala +++ b/test/files/pos/t6047.scala @@ -1,4 +1,4 @@ -import scala.reflect.makro.Context +import scala.reflect.macros.Context import java.io.InputStream object Macros { |