handzlikchris / handzlikchris/FastScriptReload
Error on updating file with interface+class with event parameter that's inside class
- Langage dominant
- C#
- Étoiles
- 2.2k
- Forks
- 167
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Tried updating BouncerService.cs:
```csharp
public interface IBouncerService {
event Action Bounced;
// ..
}
public class BouncerService : IBouncerService {
public struct Case { /* .. */ }
public event Action Bounced = delegate { };
// ..
}
```
Got following SourceCodeCombined.cs:
```csharp
public interface IBouncerService__Patched_{
event Action Bounced;
// ..
}
public class BouncerService__Patched_: IBouncerService {
public struct Case { /* .. */ }
public event Action Bounced = delegate { };
// ..
}
```
With following error:
```
error CS0738: 'BouncerService__Patched_' does not implement interface member 'IBouncerService.Bounced'. 'BouncerService__Patched_.Bounced' cannot implement 'IBouncerService.Bounced' because it does not have the matching return type of 'Action'.
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start with the BouncerService.cs example and inspect the generated SourceCodeCombined.cs output, focusing on how the interface and class are renamed. Reproduce the compiler error and trace the hot-reload transformation that produces the renamed types. Done means the transformed example compiles without CS0738 and the event still matches the interface member.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp, unity
- Domaine
- devtools, game-dev
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100