Bug 40057 - NRE on `ToDictionary` for array of anonymous types
Summary: NRE on `ToDictionary` for array of anonymous types
Alias: None
Product: Workbooks & Inspector
Classification: Xamarin
Component: Agent: Mac ()
Version: 0.7.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: inspectordev-discuss
Depends on: 40060
  Show dependency tree
Reported: 2016-04-01 17:25 UTC by Alex Corrado [MSFT]
Modified: 2016-05-26 13:34 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alex Corrado [MSFT] 2016-04-01 17:25:45 UTC
Test case:

var stuff = new [] {
	new { Foo = "bar", Baz = "bong" }
}.ToDictionary (s => s.Foo)

The above code yields this:

NullReferenceException: Object reference not set to an instance of an object
at void Xamarin.Inspector.Repl.ReplViewModel.<CoreExecuteSubmissionAsync>c__async8.MoveNext ()
Comment 1 Aaron Bockover [MSFT] 2016-04-01 18:25:47 UTC
This is a bug in Mono itself it seems: