blob: ef9e5c1270a14545563d92fb1b66e07436fb3dda (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
Type in expressions to have them evaluated.
Type :help for more information.
scala>
scala>
scala> // "Is this thing on?" Not working on first couple
scala> // commands, needs investigation.
scala> 123
res0: Int = 123
scala> 123
res1: Int = 123
scala> 123
res2: Int = 123
scala>
scala> object o {
case class Bippy()
case class Dingus {
def f[T](xs: TraversableOnce[T]) = xs match {
case _: List[Int] => 1
case _: Set[String] => 2
case _ => xs.isInstanceOf[Iterator[Double]]
}
}
case class DingDangDoobie(ding: Int, dang: Int, doobie: Double)
case class Dongoo
@serializable case class Heyooooo
@deprecated("I'm an ironic deprecation warning") def f0 = 5 // where's this disappearing?
def f1 = Double.Epsilon // and this?
}
warning: there were 6 deprecation warnings; re-run with -deprecation for details
warning: there were 3 unchecked warnings; re-run with -unchecked for details
defined module o
scala>
scala> :warnings
<console>:3: warning: case classes without a parameter list have been deprecated;
use either case objects or case classes with `()' as parameter list.
case class Dingus {
^
<console>:11: warning: case classes without a parameter list have been deprecated;
use either case objects or case classes with `()' as parameter list.
case class Dongoo
^
<console>:11: warning: case classes without a parameter list have been deprecated;
use either case objects or case classes with `()' as parameter list.
case class Dongoo
^
<console>:12: warning: case classes without a parameter list have been deprecated;
use either case objects or case classes with `()' as parameter list.
@serializable case class Heyooooo
^
scala>
scala>
|