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

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


Attachments

Description Alex Corrado 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:

https://bugzilla.xamarin.com/show_bug.cgi?id=40060

Note You need to log in before you can comment on or make changes to this bug.