I've just upgraded to VS2015.1 and got a compiler crash when trying to compile one of my projects. If you put the following repo code in a console application (and add a reference to moq.dll) the code in line 12 crashes my compiler. It seems to happen during a Roslyn lamdba rewrite call.

using System.Collections.Generic; using System.Linq; using Moq; namespace RoslynError { class Program { static void Main(string[] args) { var mockRepo = new MockRepository(MockBehavior.Strict); var obj = mockRepo.OneOf<DTO>(x => x.Value == (OptionEnum?)null); } } class DTO { public DTO(OptionEnum? enumVal) { Value = enumVal; } public OptionEnum? Value; } enum OptionEnum { NotSpecified } }

Anyone know why the crash occurs?