File tree Expand file tree Collapse file tree 5 files changed +25
-5
lines changed Expand file tree Collapse file tree 5 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 33
33
| ^
34
34
|error overriding method foo in trait E2 of type => Int called from JS as 'property 'bar'';
35
35
| 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
36
41
-- Error: tests/neg-scalajs/jsname-override.scala:57:6 -----------------------------------------------------------------
37
42
57 | def foo: Int // error
38
43
| ^
39
44
|error overriding method foo in trait F2 of type => Int called from JS as 'property 'foo'';
40
45
| 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
41
51
-- Error: tests/neg-scalajs/jsname-override.scala:66:15 ----------------------------------------------------------------
42
52
66 | override def foo(x: Int): Int = x // error
43
53
| ^
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ trait E2 extends E1 {
47
47
@ JSName (" bar" )
48
48
def foo : Int // error
49
49
}
50
- class E3 extends E2
50
+ class E3 extends E2 // error
51
51
52
52
class F1 extends js.Object {
53
53
@ JSName (" bar" )
@@ -56,7 +56,7 @@ class F1 extends js.Object {
56
56
trait F2 extends F1 {
57
57
def foo : Int // error
58
58
}
59
- class F3 extends F2
59
+ class F3 extends F2 // error
60
60
61
61
class G1 [T ] extends js.Object {
62
62
@ JSName (" bar" )
Original file line number Diff line number Diff line change 43
43
| ^
44
44
|error overriding method foo in trait G2 of type => Int called from JS as 'property 'Syms$.sym1'';
45
45
| 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
46
51
-- Error: tests/neg-scalajs/jsname-symbol-override.scala:80:6 ----------------------------------------------------------
47
52
80 | def foo: Int // error
48
53
| ^
49
54
|error overriding method foo in trait H2 of type => Int called from JS as 'property 'foo'';
50
55
| 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
51
61
-- Error: tests/neg-scalajs/jsname-symbol-override.scala:89:15 ---------------------------------------------------------
52
62
89 | override def foo(x: Int): Int = x // error
53
63
| ^
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ trait G2 extends G1 {
70
70
@ JSName (Syms .sym1)
71
71
def foo : Int // error
72
72
}
73
- class G3 extends G2
73
+ class G3 extends G2 // error
74
74
75
75
class H1 extends js.Object {
76
76
@ JSName (Syms .sym1)
@@ -79,7 +79,7 @@ class H1 extends js.Object {
79
79
trait H2 extends H1 {
80
80
def foo : Int // error
81
81
}
82
- class H3 extends H2
82
+ class H3 extends H2 // error
83
83
84
84
class I1 [T ] extends js.Object {
85
85
@ JSName (Syms .sym1)
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ abstract class Foo[A] {
4
4
abstract class Bar [A ] extends Foo [A ] {
5
5
def foo (x : A with String ): Unit = println(x.toUpperCase)
6
6
}
7
- object Baz extends Bar [Int ] // error overriding foo: incompatible type
7
+ object Baz extends Bar [Int ] // error: not implemented (same as Scala 2)
8
8
// Scala 2 gives: object creation impossible. Missing implementation for `foo`
9
9
10
10
object Test {
You can’t perform that action at this time.
0 commit comments