dotnet / dotnet/csharpstandard
8.6 Signatures and overloading - Explicit indexer implementations
- Dominant language
- C#
- Stars
- 815
- Forks
- 99
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 16
Description
The current wording in _8.6 Signatures and overloading_:
> • The signature of an indexer consists of the type of each of its formal parameters, considered in the order left to right. The signature of an indexer specifically does not include the element type, nor does it include the params modifier that may be specified for the right-most parameter.
Because for indexers (unlike methods) signatures do not include name, it would make the following code invalid:
```
interface IA
{
int this[int x] { set; }
}
interface IB
{
int this[int x] { set; }
}
class C : IA, IB
{
int IA.this[int x] { set { } }
int IB.this[int x] { set { } }
}
```
We should somehow include parts `IA.` and `IB.` that appear in indexer implementations into their signatures to make them distinct.
Contributor guide
Assessment
This issue has not been assessed yet.