Skip to content

Commit 8b91b55

Browse files
committed
Fix tests
1 parent de523b3 commit 8b91b55

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

tests/neg-scalajs/jsname-override.check

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,21 @@
3333
| ^
3434
|error overriding method foo in trait E2 of type => Int called from JS as 'property 'bar'';
3535
| method foo in class E1 of type => Int called from JS as 'property 'foo'' has a different JS calling convention
36+
-- Error: tests/neg-scalajs/jsname-override.scala:50:6 -----------------------------------------------------------------
37+
50 |class E3 extends E2 // error
38+
| ^
39+
|error overriding method foo in trait E2 of type => Int called from JS as 'property 'bar'';
40+
| method foo in class E1 of type => Int called from JS as 'property 'foo'' has a different JS calling convention
3641
-- Error: tests/neg-scalajs/jsname-override.scala:57:6 -----------------------------------------------------------------
3742
57 | def foo: Int // error
3843
| ^
3944
|error overriding method foo in trait F2 of type => Int called from JS as 'property 'foo'';
4045
| method foo in class F1 of type => Int called from JS as 'property 'bar'' has a different JS calling convention
46+
-- Error: tests/neg-scalajs/jsname-override.scala:59:6 -----------------------------------------------------------------
47+
59 |class F3 extends F2 // error
48+
| ^
49+
|error overriding method foo in trait F2 of type => Int called from JS as 'property 'foo'';
50+
| method foo in class F1 of type => Int called from JS as 'property 'bar'' has a different JS calling convention
4151
-- Error: tests/neg-scalajs/jsname-override.scala:66:15 ----------------------------------------------------------------
4252
66 | override def foo(x: Int): Int = x // error
4353
| ^

tests/neg-scalajs/jsname-override.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ trait E2 extends E1 {
4747
@JSName("bar")
4848
def foo: Int // error
4949
}
50-
class E3 extends E2
50+
class E3 extends E2 // error
5151

5252
class F1 extends js.Object {
5353
@JSName("bar")
@@ -56,7 +56,7 @@ class F1 extends js.Object {
5656
trait F2 extends F1 {
5757
def foo: Int // error
5858
}
59-
class F3 extends F2
59+
class F3 extends F2 // error
6060

6161
class G1[T] extends js.Object {
6262
@JSName("bar")

tests/neg-scalajs/jsname-symbol-override.check

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,21 @@
4343
| ^
4444
|error overriding method foo in trait G2 of type => Int called from JS as 'property 'Syms$.sym1'';
4545
| method foo in class G1 of type => Int called from JS as 'property 'foo'' has a different JS calling convention
46+
-- Error: tests/neg-scalajs/jsname-symbol-override.scala:73:6 ----------------------------------------------------------
47+
73 |class G3 extends G2 // error
48+
| ^
49+
|error overriding method foo in trait G2 of type => Int called from JS as 'property 'Syms$.sym1'';
50+
| method foo in class G1 of type => Int called from JS as 'property 'foo'' has a different JS calling convention
4651
-- Error: tests/neg-scalajs/jsname-symbol-override.scala:80:6 ----------------------------------------------------------
4752
80 | def foo: Int // error
4853
| ^
4954
|error overriding method foo in trait H2 of type => Int called from JS as 'property 'foo'';
5055
| method foo in class H1 of type => Int called from JS as 'property 'Syms$.sym1'' has a different JS calling convention
56+
-- Error: tests/neg-scalajs/jsname-symbol-override.scala:82:6 ----------------------------------------------------------
57+
82 |class H3 extends H2 // error
58+
| ^
59+
|error overriding method foo in trait H2 of type => Int called from JS as 'property 'foo'';
60+
| method foo in class H1 of type => Int called from JS as 'property 'Syms$.sym1'' has a different JS calling convention
5161
-- Error: tests/neg-scalajs/jsname-symbol-override.scala:89:15 ---------------------------------------------------------
5262
89 | override def foo(x: Int): Int = x // error
5363
| ^

tests/neg-scalajs/jsname-symbol-override.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ trait G2 extends G1 {
7070
@JSName(Syms.sym1)
7171
def foo: Int // error
7272
}
73-
class G3 extends G2
73+
class G3 extends G2 // error
7474

7575
class H1 extends js.Object {
7676
@JSName(Syms.sym1)
@@ -79,7 +79,7 @@ class H1 extends js.Object {
7979
trait H2 extends H1 {
8080
def foo: Int // error
8181
}
82-
class H3 extends H2
82+
class H3 extends H2 // error
8383

8484
class I1[T] extends js.Object {
8585
@JSName(Syms.sym1)

tests/neg/i12828c.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ abstract class Foo[A] {
44
abstract class Bar[A] extends Foo[A] {
55
def foo(x: A with String): Unit = println(x.toUpperCase)
66
}
7-
object Baz extends Bar[Int] // error overriding foo: incompatible type
7+
object Baz extends Bar[Int] // error: not implemented (same as Scala 2)
88
// Scala 2 gives: object creation impossible. Missing implementation for `foo`
99

1010
object Test {

0 commit comments

Comments
 (0)