File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
sbt-dotty/sbt-test/sbt-dotty/analyzer-plugin Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,14 @@ package hello
2
2
3
3
import lib ._
4
4
5
+ case class Student (name : String )
6
+
5
7
class M (val n : Int ) {
6
8
val a = 30 * n
9
+ def this (c : Char ) = this (c.toInt)
10
+
7
11
class B (x : Int ) {
12
+ def this (c : Char ) = this (c.toInt)
8
13
val b = x * a
9
14
def bar (i : Int ) = i * x
10
15
}
@@ -20,17 +25,17 @@ class M(val n: Int) {
20
25
}
21
26
22
27
23
- object Hello {
28
+ object Test {
24
29
def testLib : Unit = {
25
- val a = new A (30 )
26
- val b = new a.B (24 )
30
+ val a : A = new A (30 )
31
+ val b : a. B = new a.B (24 )
27
32
a.foo(3 )
28
33
b.bar(9 )
29
34
}
30
35
31
36
def testHello : Unit = {
32
- val a = new M (30 )
33
- val b = new a.B (24 )
37
+ val a : M = new M (30 )
38
+ val b : a. B = new a.B (24 )
34
39
a.foo(3 )
35
40
b.bar(9 )
36
41
}
Original file line number Diff line number Diff line change 1
1
package lib
2
2
3
3
class A (val n : Int ) {
4
+ def this (c : Char ) = this (c.toInt)
5
+
4
6
val a = 30 * n
7
+ // val p = Product("x", 100)
8
+
5
9
class B (x : Int ) {
10
+ def this (c : Char ) = this (c.toInt)
6
11
val b = x * a
7
12
def bar (i : Int ) = i * x
8
13
}
9
14
10
15
def foo (i : Int ) = i * n
11
16
}
17
+
18
+ case class Product (name : String , price : Int )
You can’t perform that action at this time.
0 commit comments