To reproduce this:
public interface IValue<TValue>
where TValue : IValue<TValue> { }
public class Value<TValue>
where TValue : unmanaged, IValue<TValue> { }
public interface IUnmanagedValue
{
void Use<TValue>(Value<TValue> value)
where TValue : unmanaged, IValue<TValue>;
}
public static class Test
{
public static void Run()
{
var expectations = Rock.Create<IUnmanagedValue>();
}
}
This will create a constraint like where TValue : unmanaged, struct, IValue<TValue> . But that's illegal - struct shouldn't be there. The ITypeParameterSymbol for TValue ends up having HasUnmanagedTypeConstraint and HasValueTypeConstraint, but I'm guessing that if the unmanaged constraint exists, you don't need to look at HasValueTypeConstraint.
To reproduce this:
This will create a constraint like
where TValue : unmanaged, struct, IValue<TValue>. But that's illegal -structshouldn't be there. TheITypeParameterSymbolforTValueends up havingHasUnmanagedTypeConstraintandHasValueTypeConstraint, but I'm guessing that if theunmanagedconstraint exists, you don't need to look atHasValueTypeConstraint.