Closed grendizeras closed 7 months ago
Will look into it! What happens if you make DomainEvent
abstract? Otherwise I think I agree on the ordering
Will be fixed by #145 (when you want the base types to also be published)
Fixed in 3.0.0-preview.25
I have base notification class
public record DomainEvent(DateTimeOffset Timestamp) : INotification;
and several child classes:
public record RoundCreated(long Id, DateTimeOffset Timestamp) : DomainEvent(Timestamp);
public record RoundResulted(long Id, WinState? Win, DateTimeOffset Timestamp) : DomainEvent(Timestamp)
public record RoundSucceeded(long Id, DateTimeOffset Timestamp) : DomainEvent(Timestamp)
I only have handlers for child event notifications. In this case source generator generate switch cases in incorrect order:resulting in Error CS8120
"The switch case is unreachable. It has already been handled by a previous case or it is impossible to match. "
Expected behavior would be to place base class case last.