handzlikchris / handzlikchris/FastScriptReload

Interface implementation returning inner class isn't correctly patched

Aperta
#162 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C#
Stelle
2.2k
Fork
167
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Interface and class in the same file. Method returns inner class.
```csharp
public interface ITest {
Test.Builder Create(Entity entity, string prefixId);
}

public class Test : ITest {
Builder ITest.Create(Entity entity, string prefixId) {
// ...
return new Builder();
}

public class Builder { }
}
```
FSR produces:
```csharp
public interface ITest__Patched_{
Test.Builder Create(Entity entity, string prefixId);
}

public class Test__Patched_: ITest { // error CS0535
Builder ITest.Create(Entity entity, string prefixId) { // error CS0539
// ...
return new Builder();
}

public class Builder { }
}
```
error CS0535: 'Test__Patched_' does not implement interface member 'ITest.Create(Entity, string)'
error CS0539: 'Test__Patched_.Create(Entity, string)' in explicit interface declaration is not found among members of the interface that can be implemented

Moving interface out of the file doesn't help. Same CS0539 and CS0535 errors.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.