blob: 7623eb2fbcb31741b4d4e1526a68bc80f3a9762a (
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
Type in expressions to have them evaluated.
Type :help for more information.
scala>
scala>
scala> res0: Int = 7
scala> | | | | gcd: (int,int)int
scala> five: int = 5
scala> x: Int = 1
scala> x: Int = 2
scala> three: Int = 3
scala> defined type alias anotherint
scala> four: anotherint = 4
scala> <console>:5: error: type mismatch;
found : java.lang.String("hello")
required: anotherint
val bogus: anotherint = "hello"
^
scala> defined trait PointlessTrait
scala>
scala>
scala> defined class Foo
scala> defined class Bar
scala> foo2bar: (Foo)Bar
scala> bar: Bar = Bar(3)
scala>
scala>
scala> import bar._
scala> m: int = 3
scala>
scala>
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala> one: Int = 1
scala>
scala>
scala> x1: Int = 1
scala> x2: Int = 1
scala> x3: Int = 1
scala> x4: Int = 1
scala> x5: Int = 1
scala> x6: Int = 1
scala> x7: Int = 1
scala> x8: Int = 1
scala> x9: Int = 1
scala> x10: Int = 1
scala> x11: Int = 1
scala> x12: Int = 1
scala> x13: Int = 1
scala> x14: Int = 1
scala> x15: Int = 1
scala> x16: Int = 1
scala> x17: Int = 1
scala> x18: Int = 1
scala> x19: Int = 1
scala> x20: Int = 1
scala>
scala> two: Int = 2
scala>
scala>
scala>
scala>
scala> <console>:1: error: '=' expected but '=>' found.
def x => y => z
^
<console>:1: error: illegal start of simple expression
def x => y => z
^
scala> <console>:1: error: identifier expected but integer literal found.
[1,2,3]
^
<console>:1: error: ']' expected but eof found.
[1,2,3]
^
scala>
scala>
scala>
scala> | | | | res2: scala.xml.Elem =
<a>
<b d="dd" c="c"></b></a>
scala>
scala>
scala> | | | |
scala>
scala>
scala>
scala> | | | res3: java.lang.String =
hello
there
scala>
scala> | | You typed two blank lines. Starting a new command.
scala>
scala> match: Int
scala> x: Int = 1
scala>
scala>
|