-
Notifications
You must be signed in to change notification settings - Fork 383
Closed
dotnet/sdk
#30250Description
Example:
public abstract partial class A
{
public abstract TResult? Accept<TResult>(int a);
}
public sealed partial class B : A
{
public override TResult? Accept<TResult>(int a) where TResult : default { throw null; }
}After roundtrip: source -> ISymbol-> SyntaxGenerator -> source:
public abstract partial class A
{
public abstract TResult? Accept<TResult>(int a);
}
public sealed partial class B : A
{
/// error CS0508: 'B.Accept<TResult>(int)': return type must be 'TResult' to match overridden member 'A.Accept<TResult>(int)'
/// error CS0453: The type 'TResult' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'Nullable<T>'
public override TResult? Accept<TResult>(int a) { throw null; }
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels