forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
js-trait-members.check
32 lines (32 loc) · 2.29 KB
/
js-trait-members.check
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- Error: tests/neg-scalajs/js-trait-members.scala:5:6 -----------------------------------------------------------------
5 | val a1: js.UndefOr[Int] = 5 // error
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| Members of non-native JS traits must either be abstract, or their right-hand-side must be `js.undefined`.
-- Error: tests/neg-scalajs/js-trait-members.scala:6:6 -----------------------------------------------------------------
6 | val a2: Int = 5 // error
| ^^^^^^^^^^^^^^^
| Members of non-native JS traits must either be abstract, or their right-hand-side must be `js.undefined`.
-- Error: tests/neg-scalajs/js-trait-members.scala:8:6 -----------------------------------------------------------------
8 | def b1: js.UndefOr[Int] = 5 // error
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| Members of non-native JS traits must either be abstract, or their right-hand-side must be `js.undefined`.
-- Error: tests/neg-scalajs/js-trait-members.scala:9:6 -----------------------------------------------------------------
9 | def b2: Int = 5 // error
| ^^^^^^^^^^^^^^^
| Members of non-native JS traits must either be abstract, or their right-hand-side must be `js.undefined`.
-- Error: tests/neg-scalajs/js-trait-members.scala:11:6 ----------------------------------------------------------------
11 | var c1: js.UndefOr[Int] = 5 // error
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| Members of non-native JS traits must either be abstract, or their right-hand-side must be `js.undefined`.
-- Error: tests/neg-scalajs/js-trait-members.scala:12:6 ----------------------------------------------------------------
12 | var c2: Int = 5 // error
| ^^^^^^^^^^^^^^^
| Members of non-native JS traits must either be abstract, or their right-hand-side must be `js.undefined`.
-- Error: tests/neg-scalajs/js-trait-members.scala:14:24 ---------------------------------------------------------------
14 | def d1(x: Int): Int = x + 1 // error
| ^^^^^
| In non-native JS traits, defs with parentheses must be abstract.
-- Error: tests/neg-scalajs/js-trait-members.scala:15:23 ---------------------------------------------------------------
15 | def d2[A](x: A): A = x // error
| ^
| In non-native JS traits, defs with parentheses must be abstract.