Skip to content

Commit d901e19

Browse files
committed
Fix compiler and tests to compile under new rules
1 parent 85e5306 commit d901e19

File tree

6 files changed

+37
-37
lines changed

6 files changed

+37
-37
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeAsmCommon.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ package jvm
77
* the compiler cake (Global).
88
*/
99
final class BCodeAsmCommon[I <: BackendInterface](val interface: I) {
10-
import interface._
10+
import interface._
1111

1212
/**
1313
* True if `classSym` is an anonymous class or a local class. I.e., false if `classSym` is a

tests/neg/exports.check

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@
3131
| final def status: => List[String] in class Copier at line 23 and
3232
| final def status: => List[String] in class Copier at line 24
3333
| have the same type after erasure.
34-
-- Error: tests/neg/exports.scala:35:15 --------------------------------------------------------------------------------
35-
35 | export this.{concat => ++} // error: no eligible member
36-
| ^^^^^^
37-
| no eligible member concat at this
38-
| this.concat cannot be exported because it is already a member of trait IterableOps
39-
-- Error: tests/neg/exports.scala:41:13 --------------------------------------------------------------------------------
40-
41 | export foo.foo // error: no eligible member
41-
| ^^^
42-
| no eligible member foo at this.foo
43-
| this.foo.foo cannot be exported because it is already a member of class Foo
44-
-- [E120] Duplicate Symbol Error: tests/neg/exports.scala:46:13 --------------------------------------------------------
45-
46 | export bar._ // error: double definition
46-
| ^
47-
| Double definition:
48-
| val bar: Bar in class Baz at line 45 and
49-
| final def bar: => => Bar(Baz.this.bar.baz.bar)(Baz.this.bar.bar) in class Baz at line 46
34+
-- Error: tests/neg/exports.scala:35:17 --------------------------------------------------------------------------------
35+
35 | export this.{concat => ++} // error: no eligible member
36+
| ^^^^^^
37+
| no eligible member concat at this
38+
| this.concat cannot be exported because it is already a member of trait IterableOps
39+
-- Error: tests/neg/exports.scala:41:15 --------------------------------------------------------------------------------
40+
41 | export foo.foo // error: no eligible member
41+
| ^^^
42+
| no eligible member foo at this.foo
43+
| this.foo.foo cannot be exported because it is already a member of class Foo
44+
-- [E120] Duplicate Symbol Error: tests/neg/exports.scala:46:15 --------------------------------------------------------
45+
46 | export bar._ // error: double definition
46+
| ^
47+
| Double definition:
48+
| val bar: Bar in class Baz at line 45 and
49+
| final def bar: => => Bar(Baz.this.bar.baz.bar)(Baz.this.bar.bar) in class Baz at line 46

tests/neg/exports.scala

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@
2828
def status: List[String] = printUnit.status ++ scanUnit.status
2929
}
3030

31-
trait IterableOps[+A, +CC[_], +C] {
31+
trait IterableOps[+A, +CC[_], +C] {
3232

33-
def concat[B >: A](other: List[B]): CC[B]
33+
def concat[B >: A](other: List[B]): CC[B]
3434

35-
export this.{concat => ++} // error: no eligible member
35+
export this.{concat => ++} // error: no eligible member
3636

37-
}
37+
}
3838

39-
class Foo {
40-
val foo : Foo = new Foo
41-
export foo.foo // error: no eligible member
42-
}
39+
class Foo {
40+
val foo : Foo = new Foo
41+
export foo.foo // error: no eligible member
42+
}
4343

44-
class Baz {
45-
val bar: Bar = new Bar
46-
export bar._ // error: double definition
47-
}
48-
class Bar {
49-
val baz: Baz = new Baz
50-
export baz._
51-
}
44+
class Baz {
45+
val bar: Bar = new Bar
46+
export bar._ // error: double definition
47+
}
48+
class Bar {
49+
val baz: Baz = new Baz
50+
export baz._
51+
}

tests/neg/parser-stability-12.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
trait x0[] // error
22
trait x1[x1 <:x0]
3-
extends x1[
3+
extends x1[ // error
44
// error

tests/neg/parser-stability-19.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
object x0 {
2-
case class x0[]() // error // error
3-
def x0( ) ] // error // error
2+
case class x0[]() // error
3+
def x0( ) ] // error
44
def x0 ( x0:x0 ):x0.type = x1 x0 // error // error
55
// error

tests/pos/i6146.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
trait BS[T, S <: BS[T, S]]
2-
trait IS extends BS[Int, IS]
2+
trait IS extends BS[Int, IS]
33

44
sealed trait BSElem[T, S <: BS[_, S]]
55
// old error: Type argument S does not conform to upper bound BS[Any, LazyRef(S)]

0 commit comments

Comments
 (0)