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
22
33import lib ._
44
5+ case class Student (name : String )
6+
57class M (val n : Int ) {
68 val a = 30 * n
9+ def this (c : Char ) = this (c.toInt)
10+
711 class B (x : Int ) {
12+ def this (c : Char ) = this (c.toInt)
813 val b = x * a
914 def bar (i : Int ) = i * x
1015 }
@@ -20,17 +25,17 @@ class M(val n: Int) {
2025}
2126
2227
23- object Hello {
28+ object Test {
2429 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 )
2732 a.foo(3 )
2833 b.bar(9 )
2934 }
3035
3136 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 )
3439 a.foo(3 )
3540 b.bar(9 )
3641 }
Original file line number Diff line number Diff line change 11package lib
22
33class A (val n : Int ) {
4+ def this (c : Char ) = this (c.toInt)
5+
46 val a = 30 * n
7+ // val p = Product("x", 100)
8+
59 class B (x : Int ) {
10+ def this (c : Char ) = this (c.toInt)
611 val b = x * a
712 def bar (i : Int ) = i * x
813 }
914
1015 def foo (i : Int ) = i * n
1116}
17+
18+ case class Product (name : String , price : Int )
You can’t perform that action at this time.
0 commit comments