You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attached example code gives an exception Unhandled Exception: System.FormatException: Encountered an invalid type for a default value.
when run using version 4.5.21. It runs without error using version 4.2.1510.2205
using System;
using Moq;
namespace MoqProblem
{
public interface ITestMoq
{
void WithDefaults(DateTime dateTime = default(DateTime));
}
class Program
{
static void Main(string[] args)
{
var test = new Mock<ITestMoq>();
var t = test.Object;
}
}
}
The text was updated successfully, but these errors were encountered:
shadowfaxer
changed the title
Invalid type for a default value exception
Invalid type for a default value exception (regression)
Oct 26, 2016
The attached example code gives an exception
Unhandled Exception: System.FormatException: Encountered an invalid type for a default value.
when run using version
4.5.21
. It runs without error using version4.2.1510.2205
The text was updated successfully, but these errors were encountered: