diff options
author | Paul Phillips <paulp@improving.org> | 2012-02-22 20:34:25 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-22 21:41:26 -0800 |
commit | 98cf4014a3a14dbc348a464584133d90719bdbb8 (patch) | |
tree | add010ac2c7ab3e5899e2f19b47dcaa278a3734b /test/files/neg/elide-to-nothing.scala | |
parent | 06384c052ec31db4bd094b949bed0f3cb3fb644b (diff) | |
download | scala-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/elide-to-nothing.scala')
-rw-r--r-- | test/files/neg/elide-to-nothing.scala | 31 |
1 files changed, 0 insertions, 31 deletions
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 - -} - - - - - |