File tree Expand file tree Collapse file tree 2 files changed +30
-30
lines changed Expand file tree Collapse file tree 2 files changed +30
-30
lines changed Original file line number Diff line number Diff line change 11object Test1 {
2- class A {
3- override def toString : String = " A"
4- }
5- class B (a : A ) {
6- export a .toString // error: no eligible member toString at B.this.a
7- }
2+ class A {
3+ override def toString : String = " A"
4+ }
5+ class B (a : A ) {
6+ export a .toString // error: no eligible member toString at B.this.a
7+ }
88}
99
1010object Test extends App {
11- trait T {
12- def foo : Int = 1
11+ trait T {
12+ def foo : Int = 1
1313 def bar : Int
14- }
15- class A extends T {
16- override def foo = 2
14+ }
15+ class A extends T {
16+ override def foo = 2
1717 override def bar = 2
18- }
19- class B (a : A ) extends T {
20- export a .foo // error: no eligible member foo at B.this.a
18+ }
19+ class B (a : A ) extends T {
20+ export a .foo // error: no eligible member foo at B.this.a
2121 export a .bar // OK
22- }
22+ }
2323}
Original file line number Diff line number Diff line change 11object Test1 {
2- class A {
3- override def toString : String = " A"
4- }
5- class B (a : A ) {
6- export a ._ // OK
7- }
2+ class A {
3+ override def toString : String = " A"
4+ }
5+ class B (a : A ) {
6+ export a ._ // OK
7+ }
88}
99
1010object Test extends App {
11- trait T {
12- def foo : Int = 1
11+ trait T {
12+ def foo : Int = 1
1313 def bar : Int
14- }
15- class A extends T {
16- override def foo = 2
14+ }
15+ class A extends T {
16+ override def foo = 2
1717 override def bar = 2
18- }
19- class B (a : A ) extends T {
20- export a ._
21- }
18+ }
19+ class B (a : A ) extends T {
20+ export a ._
21+ }
2222 val b = B (A ())
2323 assert(b.foo == 1 )
2424 assert(b.bar == 2 )
You can’t perform that action at this time.
0 commit comments