To reproduce:
public interface IGenericDefault
{
void Setup<T>(T initialValue = default(T));
}
Rocks generates it like this:
public void Setup<T>(T? @initialValue = null)
This gives:
error CS1750: A value of type '<null>' cannot be used as a default parameter because there are no standard conversions to type 'TProperty'
As well as on the extension method:
@initialValue.Transform(null)
It's trying to transform T from null and that isn't allowed.
This was found on Moq.Protected.IProtectedAsMock<,>.
To reproduce:
Rocks generates it like this:
This gives:
As well as on the extension method:
It's trying to transform
Tfromnulland that isn't allowed.This was found on
Moq.Protected.IProtectedAsMock<,>.