[Mono-bugs] [Bug 638225] New: Compiler throws exception when compiling file

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Sep 9 09:27:26 EDT 2010



           Summary: Compiler throws exception when compiling file
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: julian at semmle.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Description of Problem:

The gmcs (and I believe dmcs) compilers throw an exception when compiling the
file shown below

Steps to reproduce the problem:
1. Compile:

public class TestCreations {
    void Main(string[] args) {
        var contacts = new[] { 
            new {
                Lucky = 13

Actual Results:

bug.cs(3,7): warning CS0168: The variable `contacts' is declared but never used
Internal compiler error at bug.cs(2,7):: exception caught while emitting
MethodBuilder [TestCreations::Main]

Unhandled Exception: System.NotSupportedException: The invoked member is not
supported in a dynamic module.
  at System.Reflection.Emit.ConstructorBuilder.get_MethodHandle () [0x00000] in
<filename unknown>:0 
  at Mono.CSharp.MethodSpec.GetMetaInfo () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.EmitContext.Emit (OpCode opcode, Mono.CSharp.MethodSpec
method) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.New.Emit (Mono.CSharp.EmitContext ec, IMemoryLocation target)
[0x00000] in <filename unknown>:0 

Expected Results:

bug.cs(3,7): warning CS0168: The variable `contacts' is declared but never used

How often does this happen?

Every time

Additional Information:


Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list