summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-02-22 20:34:25 -0800
committerPaul Phillips <paulp@improving.org>2012-02-22 21:41:26 -0800
commit98cf4014a3a14dbc348a464584133d90719bdbb8 (patch)
treeadd010ac2c7ab3e5899e2f19b47dcaa278a3734b /test/files/neg
parent06384c052ec31db4bd094b949bed0f3cb3fb644b (diff)
downloadscala-98cf4014a3a14dbc348a464584133d90719bdbb8.tar.gz
scala-98cf4014a3a14dbc348a464584133d90719bdbb8.tar.bz2
scala-98cf4014a3a14dbc348a464584133d90719bdbb8.zip
One last nudge for elidable.
A method with return type Nothing elides into a call to ??? . It's the role ??? was born for.
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/elide-to-nothing.check4
-rw-r--r--test/files/neg/elide-to-nothing.flags1
-rw-r--r--test/files/neg/elide-to-nothing.scala31
3 files changed, 0 insertions, 36 deletions
diff --git a/test/files/neg/elide-to-nothing.check b/test/files/neg/elide-to-nothing.check
deleted file mode 100644
index 3ef05aac9a..0000000000
--- a/test/files/neg/elide-to-nothing.check
+++ /dev/null
@@ -1,4 +0,0 @@
-elide-to-nothing.scala:14: error: Cannot elide where Nothing is required.
- val b: Nothing = unimplemented()
- ^
-one error found
diff --git a/test/files/neg/elide-to-nothing.flags b/test/files/neg/elide-to-nothing.flags
deleted file mode 100644
index 59a512e547..0000000000
--- a/test/files/neg/elide-to-nothing.flags
+++ /dev/null
@@ -1 +0,0 @@
--Xelide-below 500
diff --git a/test/files/neg/elide-to-nothing.scala b/test/files/neg/elide-to-nothing.scala
deleted file mode 100644
index 5008e8bc1d..0000000000
--- a/test/files/neg/elide-to-nothing.scala
+++ /dev/null
@@ -1,31 +0,0 @@
-
-/** Test which should fail compilation */
-class ElysianFailed {
-
- import ElysianField._
-
- // fine
- val a: Int = myInt
-
- // fine
- unimplemented()
-
- // not fine
- val b: Nothing = unimplemented()
-
-}
-
-object ElysianField {
-
- import annotation.elidable
-
- @elidable(100) def unimplemented(): Nothing = throw new UnsupportedOperationException
-
- @elidable(100) def myInt: Int = 17
-
-}
-
-
-
-
-