diff options
author | Som Snytt <som.snytt@gmail.com> | 2016-07-08 13:32:36 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2016-07-08 13:32:36 -0700 |
commit | 7d94d553e960322472e274669bad1c47723c2d23 (patch) | |
tree | 2604ce9027081bcfca296dfd8ebbc47f1fe9bef9 /test/files | |
parent | 4e564efb04e508ccc0f479cf1a25331501927d88 (diff) | |
download | scala-7d94d553e960322472e274669bad1c47723c2d23.tar.gz scala-7d94d553e960322472e274669bad1c47723c2d23.tar.bz2 scala-7d94d553e960322472e274669bad1c47723c2d23.zip |
SI-8829 Defaultly scala -feature -deprecation
Turn on `-feature -deprecation` in REPL if neither option
is selected.
```
$ ./build/pack/bin/scala
Welcome to Scala 2.12.0-20160707-105953-4e564ef (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_92).
Type in expressions for evaluation. Or try :help.
scala> @deprecated("","") def f = 42
f: Int
scala> f toDouble
<console>:13: warning: postfix operator toDouble should be enabled
by making the implicit value scala.language.postfixOps visible.
This can be achieved by adding the import clause 'import scala.language.postfixOps'
or by setting the compiler option -language:postfixOps.
See the Scaladoc for value scala.language.postfixOps for a discussion
why the feature should be explicitly enabled.
f toDouble
^
<console>:13: warning: method f is deprecated:
f toDouble
^
res1: Double = 42.0
scala> :quit
$ scala
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_92).
Type in expressions for evaluation. Or try :help.
scala> @deprecated("","") def f = 42
f: Int
scala> f toDouble
warning: there was one deprecation warning; re-run with -deprecation for details
warning: there was one feature warning; re-run with -feature for details
res1: Double = 42.0
```
Diffstat (limited to 'test/files')
0 files changed, 0 insertions, 0 deletions