forked from Unity-Technologies/mono
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mcs] Consider method candidates with misplaced named arguments not a…
…pplicable. Fixes #46190
- Loading branch information
1 parent
161569b
commit dea12ad
Showing
4 changed files
with
53 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// CS1744: Named argument `p1' cannot be used for a parameter which has positional argument specified | ||
// Line: 8 | ||
|
||
internal class Program | ||
{ | ||
public static void Main () | ||
{ | ||
Method (1, 2, p1: 3); | ||
} | ||
|
||
static void Method (int p1, int paramNamed, int p2) | ||
{ | ||
} | ||
|
||
static void Method (int p1, int p2, object paramNamed) | ||
{ | ||
} | ||
} |
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,18 @@ | ||
using System; | ||
|
||
internal class Program | ||
{ | ||
public static void Main () | ||
{ | ||
Method (1, 2, paramNamed: 3); | ||
} | ||
|
||
static void Method (int p1, int paramNamed, int p2) | ||
{ | ||
throw new ApplicationException (); | ||
} | ||
|
||
static void Method (int p1, int p2, object paramNamed) | ||
{ | ||
} | ||
} |
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