dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.69k stars 3.98k forks source link

"Internal error in the expression evaluator" #18832

Open Spongman opened 7 years ago

Spongman commented 7 years ago

stick this in your quickwatch and smoke it:

new string[] { }.AsQueryable().FirstOrDefault(str => str.Length == 3)
Spongman commented 7 years ago

minidump is here: http://codewithoutborders.com/posted/msvsmon.7z

Spongman commented 7 years ago

here's another slightliy different one for the same expression: http://codewithoutborders.com/posted/msvsmon2.7z

sys27 commented 7 years ago

But new string[] { }.AsQueryable().FirstOrDefault() and new string[] { }.FirstOrDefault(str => str.Length == 3) works good.

Spongman commented 7 years ago

i should add that, while my repro is rather pathological, this bug essentially kills debugging EntityFramework code, or anything else using IQueryable.