dotnet / dotnet/csharpstandard
12.6.3.1 Optional parameters and parameter arrays supposedly foil type inference
Open
status: gnarly
type: bug
- Dominant language
- C#
- Stars
- 815
- Forks
- 99
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 16
Description
Current text:
> If the supplied number of arguments is different than the number of parameters in the method, then inference immediately fails.
That would suggest that:
``` csharp
Foo(10);
...
static void Foo(T value, params string[] args) { }
```
should fail to compile.
Perhaps we should say that there has to be a corresponding parameter for each argument in the argument list? Basically, it should use 13.6.2 somehow, I'm sure - but it's not clear how.
Contributor guide
Assessment
This issue has not been assessed yet.