Bug 28661 - Compiler crash when compiling class with dynamic + overloads
Summary: Compiler crash when compiling class with dynamic + overloads
Status: NEW
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-04-01 15:13 UTC by Alexander Köplinger
Modified: 2015-04-01 15:13 UTC (History)
1 user (show)

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


Attachments
test.cs (1.00 KB, text/plain)
2015-04-01 15:13 UTC, Alexander Köplinger
Details


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 for Bug 28661 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Alexander Köplinger 2015-04-01 15:13:13 UTC
Created attachment 10593 [details]
test.cs

Compiling the attached code results in the following crash when compiled with mcs:

>$ mcs test.cs 
>
>Unhandled Exception:
>Mono.CSharp.InternalErrorException: test.cs(51,14): Test.TestMethod<T>(ref T, T) ---> Mono.CSharp.InternalErrorException: test.cs(52,5): ---> Mono.CSharp.InternalErrorException: Missing member `Test.<TestMethod>c__DynamicSite0<T>.Container0' on inflated type `Test.<TestMethod>c__DynamicSite0<T>'
>  at Mono.CSharp.MemberCache.GetMember[TypeSpec] (Mono.CSharp.TypeSpec container, Mono.CSharp.TypeSpec spec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.DynamicExpressionStatement.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression binder, Mono.CSharp.Arguments arguments, Boolean isStatement) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.DynamicExpressionStatement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args, Boolean prepareAwait) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.CallEmitter.EmitPredefined (Mono.CSharp.EmitContext ec, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Boolean statement, Nullable`1 loc) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.CallEmitter.Emit (Mono.CSharp.EmitContext ec, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.DelegateInvocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.DynamicExpressionStatement.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression binder, Mono.CSharp.Arguments arguments, Boolean isStatement) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.DynamicExpressionStatement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Return.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.ParametersBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
>  --- End of inner exception stack trace ---
>  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [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.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.TypeContainer.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.ModuleContainer.EmitContainer () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.AssemblyDefinition.Emit () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.AssemblyDefinitionStatic.Emit () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
>  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 

Note: this was extracted from the dynamics testsuite over at dotnet/corefx