Bug 11978 - Mono.CSharp.InternalErrorException creating anonymous type in the REPL
Summary: Mono.CSharp.InternalErrorException creating anonymous type in the REPL
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
Depends on:
Reported: 2013-04-25 17:48 UTC by Alex Corrado [MSFT]
Modified: 2013-04-26 04:24 UTC (History)
1 user (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 GitHub or 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] 2013-04-25 17:48:39 UTC
csharp> var foo = new { Bar = "baz" };
Mono.CSharp.InternalErrorException: (1,1): <InteractiveExpressionClass>.Host(ref object) ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.CSharp.Parameter.ApplyAttributes (System.Reflection.Emit.MethodBuilder mb, System.Reflection.Emit.ConstructorBuilder cb, Int32 index, Mono.CSharp.PredefinedAttributes pa) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ParametersCompiled.ApplyAttributes (IMemberContext mc, System.Reflection.MethodBase builder) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MethodData.Emit (Mono.CSharp.TypeDefinition parent) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.MethodOrOperator.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Method.Emit () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.CSharp.Method.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeDefinition.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ClassOrStruct.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Class.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeDefinition.EmitContainer () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Evaluator.CompileBlock (Mono.CSharp.Class host, Mono.CSharp.Undo undo, Mono.CSharp.Report Report) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Evaluator.Compile (System.String input, Mono.CSharp.CompiledMethod& compiled) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00000] in <filename unknown>:0 
  at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <filename unknown>:0
Comment 1 Alex Corrado [MSFT] 2013-04-25 17:49:41 UTC
Mono JIT compiler version 3.0.8 (master/87b9278 Mon Apr  8 16:13:31 EDT 2013)
Comment 2 Marek Safar 2013-04-26 04:24:42 UTC
Already fixed in master