summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2012-12-10 12:18:07 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2012-12-10 12:18:07 -0800
commit6f121da8902ea0b7a778f1ae1e690490330ba2ca (patch)
treec39f1a026eda50301e8661f36611ba8da9abf182 /test
parent287979d5173005501a699da1c115fbaf9fbffec2 (diff)
parente4d1d930693ac75d8eb64c2c3c69f2fc22bec739 (diff)
downloadscala-6f121da8902ea0b7a778f1ae1e690490330ba2ca.tar.gz
scala-6f121da8902ea0b7a778f1ae1e690490330ba2ca.tar.bz2
scala-6f121da8902ea0b7a778f1ae1e690490330ba2ca.zip
Merge pull request #1705 from paulp/warn-case-collision
Warn when generated classfiles differ only in case.
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/case-collision.check10
-rw-r--r--test/files/neg/case-collision.flags1
-rw-r--r--test/files/neg/case-collision.scala11
3 files changed, 22 insertions, 0 deletions
diff --git a/test/files/neg/case-collision.check b/test/files/neg/case-collision.check
new file mode 100644
index 0000000000..4edc6f1205
--- /dev/null
+++ b/test/files/neg/case-collision.check
@@ -0,0 +1,10 @@
+case-collision.scala:5: error: Class foo.BIPPY differs only in case from foo.Bippy. Such classes will overwrite one another on case-insensitive filesystems.
+class BIPPY
+ ^
+case-collision.scala:11: error: Class foo.HyRaX$ differs only in case from foo.Hyrax$. Such classes will overwrite one another on case-insensitive filesystems.
+object HyRaX
+ ^
+case-collision.scala:8: error: Class foo.DINGO$ differs only in case from foo.Dingo$. Such classes will overwrite one another on case-insensitive filesystems.
+object DINGO
+ ^
+three errors found
diff --git a/test/files/neg/case-collision.flags b/test/files/neg/case-collision.flags
new file mode 100644
index 0000000000..85d8eb2ba2
--- /dev/null
+++ b/test/files/neg/case-collision.flags
@@ -0,0 +1 @@
+-Xfatal-warnings
diff --git a/test/files/neg/case-collision.scala b/test/files/neg/case-collision.scala
new file mode 100644
index 0000000000..241169a77a
--- /dev/null
+++ b/test/files/neg/case-collision.scala
@@ -0,0 +1,11 @@
+package foo
+
+class Bippy
+
+class BIPPY
+
+object Dingo
+object DINGO
+
+case class Hyrax()
+object HyRaX