handzlikchris / handzlikchris/FastScriptReload

Error on updating file with interface+class with event parameter that's inside class

Abierto
#148 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C#
Estrellas
2.2k
Forks
167
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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'.
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp, unity
Área
devtools, game-dev
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.