forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This includes a forward-port of the upstream changes in * scala-js/scala-js@887d957 Require an explicit name in @jsglobal for 'apply' and setter names. * scala-js/scala-js@354cfdf Allow @jsglobal without explicit names inside Scala objects. * scala-js/scala-js@9fa6a83 Fix scala#4069: Make @jsimport's second arg default to the annotatee's name.
- Loading branch information
Showing
5 changed files
with
118 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 42 additions & 2 deletions
44
tests/neg-scalajs/native-load-spec-need-explicit-name.check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,48 @@ | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:6:2 ---------------------------------------------- | ||
6 | @JSGlobal // error | ||
| ^^^^^^^^^ | ||
| Native JS members inside non-native objects must have an explicit name in @JSGlobal | ||
| Native JS definitions named 'apply' must have an explicit name in @JSGlobal | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:10:2 --------------------------------------------- | ||
10 | @JSGlobal // error | ||
| ^^^^^^^^^ | ||
| Native JS members inside non-native objects must have an explicit name in @JSGlobal | ||
| Native JS definitions named 'apply' must have an explicit name in @JSGlobal | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:14:2 --------------------------------------------- | ||
14 | @JSGlobal // error | ||
| ^^^^^^^^^ | ||
| Native JS definitions with a name ending in '_=' must have an explicit name in @JSGlobal | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:20:2 --------------------------------------------- | ||
20 | @JSGlobal // error | ||
| ^^^^^^^^^ | ||
| Native JS definitions with a name ending in '_=' must have an explicit name in @JSGlobal | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:19:2 --------------------------------------------- | ||
19 | @js.native // error | ||
| ^^^^^^^^^^ | ||
| @js.native is not allowed on vars, lazy vals and setter defs | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:24:2 --------------------------------------------- | ||
24 | @JSGlobal // error | ||
| ^^^^^^^^^ | ||
| Native JS definitions named 'apply' must have an explicit name in @JSGlobal | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:30:3 --------------------------------------------- | ||
30 | @JSImport("bar.js") // error | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| Native JS definitions named 'apply' must have an explicit name in @JSImport | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:34:3 --------------------------------------------- | ||
34 | @JSImport("bar.js") // error | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| Native JS definitions named 'apply' must have an explicit name in @JSImport | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:38:3 --------------------------------------------- | ||
38 | @JSImport("bar.js") // error | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| Native JS definitions with a name ending in '_=' must have an explicit name in @JSImport | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:44:3 --------------------------------------------- | ||
44 | @JSImport("bar.js") // error | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| Native JS definitions with a name ending in '_=' must have an explicit name in @JSImport | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:43:2 --------------------------------------------- | ||
43 | @js.native // error | ||
| ^^^^^^^^^^ | ||
| @js.native is not allowed on vars, lazy vals and setter defs | ||
-- Error: tests/neg-scalajs/native-load-spec-need-explicit-name.scala:48:3 --------------------------------------------- | ||
48 | @JSImport("bar.js") // error | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| Native JS definitions named 'apply' must have an explicit name in @JSImport |
44 changes: 41 additions & 3 deletions
44
tests/neg-scalajs/native-load-spec-need-explicit-name.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters