-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compile error message in wildcard exports
closes #18031 Co-authored-by: Matt Bovel <[email protected]> Co-authored-by: Cyrille Lavigne <[email protected]> [Cherry-picked a553539]
- Loading branch information
1 parent
798dc2d
commit f6aaf2a
Showing
3 changed files
with
63 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-- Error: tests/neg/18031.scala:8:15 ----------------------------------------------------------------------------------- | ||
8 | export A.{*, x as _} // error | ||
| ^ | ||
| named exports cannot follow wildcard exports | ||
-- Error: tests/neg/18031.scala:11:15 ---------------------------------------------------------------------------------- | ||
11 | import A.{*, x as _} // error | ||
| ^ | ||
| named imports cannot follow wildcard imports | ||
-- Error: tests/neg/18031.scala:15:14 ---------------------------------------------------------------------------------- | ||
15 | export A.{x => blah} // error | ||
| ^ | ||
| The export renaming `a => b` is no longer supported ; use `a as b` instead | ||
| This construct can be rewritten automatically under -rewrite -source future-migration. | ||
-- Error: tests/neg/18031.scala:18:14 ---------------------------------------------------------------------------------- | ||
18 | import A.{x => blah} // error | ||
| ^ | ||
| The import renaming `a => b` is no longer supported ; use `a as b` instead | ||
| This construct can be rewritten automatically under -rewrite -source future-migration. | ||
-- Error: tests/neg/18031.scala:22:11 ---------------------------------------------------------------------------------- | ||
22 | export A._ // error | ||
| ^ | ||
| `_` is no longer supported for a wildcard export; use `*` instead | ||
| This construct can be rewritten automatically under -rewrite -source future-migration. | ||
-- Error: tests/neg/18031.scala:25:11 ---------------------------------------------------------------------------------- | ||
25 | import A._ // error | ||
| ^ | ||
| `_` is no longer supported for a wildcard import; use `*` instead | ||
| This construct can be rewritten automatically under -rewrite -source future-migration. |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// scalac: -source:future | ||
|
||
object A: | ||
val x, y, z = 0 | ||
|
||
|
||
object B: | ||
export A.{*, x as _} // error | ||
|
||
object C: | ||
import A.{*, x as _} // error | ||
|
||
|
||
object D: | ||
export A.{x => blah} // error | ||
|
||
object E: | ||
import A.{x => blah} // error | ||
|
||
|
||
object F: | ||
export A._ // error | ||
|
||
object G: | ||
import A._ // error |