-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
160 additions
and
77 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,17 @@ | ||
-- Error: tests/neg/i19077.scala:5:15 ---------------------------------------------------------------------------------- | ||
5 | f(1, 2, 3, x = 42) // error | ||
| ^^^^^^ | ||
| parameter x of method f: (x: Int, y: Int, z: Int): Int is already instantiated | ||
-- Error: tests/neg/i19077.scala:6:15 ---------------------------------------------------------------------------------- | ||
6 | f(1, 2, 3, w = 42) // error | ||
| ^^^^^^ | ||
| parameter w of method f: (x: Int, y: Int, z: Int): Int is already instantiated | ||
-- Error: tests/neg/i19077.scala:7:20 ---------------------------------------------------------------------------------- | ||
7 | f(1, 2, w = 42, z = 27) // error | ||
| ^^^^^^ | ||
| parameter z of method f: (x: Int, y: Int, z: Int): Int is already instantiated | ||
-- Error: tests/neg/i19077.scala:8:20 ---------------------------------------------------------------------------------- | ||
8 | f(1, 2, z = 42, w = 27) // error | ||
| ^^^^^^ | ||
| parameter w of method f: (x: Int, y: Int, z: Int): Int is already instantiated | ||
there was 1 deprecation warning; re-run with -deprecation for details |
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,8 @@ | ||
|
||
def f(@deprecatedName("x") x: Int, @deprecatedName y: Int, @deprecatedName("w") z: Int) = x+y+z | ||
|
||
@main def Test = | ||
f(1, 2, 3, x = 42) // error | ||
f(1, 2, 3, w = 42) // error | ||
f(1, 2, w = 42, z = 27) // error | ||
f(1, 2, z = 42, w = 27) // error |
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,24 +1,44 @@ | ||
-- Deprecation Warning: tests/warn/i19077.scala:8:6 -------------------------------------------------------------------- | ||
8 | f(x = 1, 2, 3) // warn | ||
| ^^^^^ | ||
| naming parameter x is deprecated | ||
-- Deprecation Warning: tests/warn/i19077.scala:9:9 -------------------------------------------------------------------- | ||
9 | f(1, y = 2, 3) // warn | ||
| ^^^^^ | ||
| naming parameter y is deprecated | ||
-- Deprecation Warning: tests/warn/i19077.scala:10:12 ------------------------------------------------------------------ | ||
10 | f(1, 2, w = 3) // warn | ||
-- Deprecation Warning: tests/warn/i19077.scala:26:14 ------------------------------------------------------------------ | ||
26 | def g = f(y = 42) // warn but omit empty since | ||
| ^^^^^^ | ||
| the parameter name y is deprecated: use x instead | ||
-- Deprecation Warning: tests/warn/i19077.scala:12:6 ------------------------------------------------------------------- | ||
12 | f(x = 1, 2, 3) // warn | ||
| ^^^^^ | ||
| naming parameter x is deprecated | ||
-- Deprecation Warning: tests/warn/i19077.scala:13:9 ------------------------------------------------------------------- | ||
13 | f(1, y = 2, 3) // warn | ||
| ^^^^^ | ||
| naming parameter y is deprecated | ||
-- Deprecation Warning: tests/warn/i19077.scala:14:12 ------------------------------------------------------------------ | ||
14 | f(1, 2, w = 3) // warn | ||
| ^^^^^ | ||
| the parameter name w is deprecated: use z instead | ||
-- Deprecation Warning: tests/warn/i19077.scala:11:13 ------------------------------------------------------------------ | ||
11 | f(w = 3, x = 1, y = 2) // warn // warn // warn | ||
-- Deprecation Warning: tests/warn/i19077.scala:15:6 ------------------------------------------------------------------- | ||
15 | f(x = 1, w = 3, y = 2) // warn // warn // warn | ||
| ^^^^^ | ||
| naming parameter x is deprecated | ||
-- Deprecation Warning: tests/warn/i19077.scala:15:20 ------------------------------------------------------------------ | ||
15 | f(x = 1, w = 3, y = 2) // warn // warn // warn | ||
| ^^^^^ | ||
| naming parameter y is deprecated | ||
-- Deprecation Warning: tests/warn/i19077.scala:15:13 ------------------------------------------------------------------ | ||
15 | f(x = 1, w = 3, y = 2) // warn // warn // warn | ||
| ^^^^^ | ||
| the parameter name w is deprecated: use z instead | ||
-- Deprecation Warning: tests/warn/i19077.scala:16:13 ------------------------------------------------------------------ | ||
16 | f(w = 3, x = 1, y = 2) // warn // warn // warn | ||
| ^^^^^ | ||
| naming parameter x is deprecated | ||
-- Deprecation Warning: tests/warn/i19077.scala:11:20 ------------------------------------------------------------------ | ||
11 | f(w = 3, x = 1, y = 2) // warn // warn // warn | ||
-- Deprecation Warning: tests/warn/i19077.scala:16:20 ------------------------------------------------------------------ | ||
16 | f(w = 3, x = 1, y = 2) // warn // warn // warn | ||
| ^^^^^ | ||
| naming parameter y is deprecated | ||
-- Deprecation Warning: tests/warn/i19077.scala:11:6 ------------------------------------------------------------------- | ||
11 | f(w = 3, x = 1, y = 2) // warn // warn // warn | ||
-- Deprecation Warning: tests/warn/i19077.scala:16:6 ------------------------------------------------------------------- | ||
16 | f(w = 3, x = 1, y = 2) // warn // warn // warn | ||
| ^^^^^ | ||
| the parameter name w is deprecated: use z instead | ||
-- Deprecation Warning: tests/warn/i19077.scala:20:8 ------------------------------------------------------------------- | ||
20 | X.f(v = 42) // warn | ||
| ^^^^^^ | ||
| the parameter name v is deprecated (since 3.3): use x instead |
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