-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Union implements implicit conversion like this:
public static implicit operator Union<TFirst, TSecond>(TFirst first) => new(first);
public static implicit operator Union<TFirst, TSecond>(TSecond second) => new(second);When a class derives from Union<,> the implicit conversion operators can't be used, because their result Union<,> can't be upcasted to the derived type.
To fix this issue, code generator should always generate specialized conversion operators for types derived from Union<,>.
Related to #8345