Commit 45a1455
authored
Only allow static methods for applicable members (#3281)
* Only allow static methods for applicable members
This fixes a very similar problem to #3277, where this code is unable to be resolved:
```cs
interface I1{}
interface I2{}
public unsafe class C : I1, I2 {
void M(I1 i) {}
static void M(I2 i) {}
public void M1() {
delegate*<C, void> a = M; // Ambiguous because both M's are applicable
}
}
```
With this change, the instance method M is not applicable, so there is no ambiguity.1 parent a6c3852 commit 45a1455
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
| 179 | + | |
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| |||
0 commit comments