https://bugzilla.novell.com/show_bug.cgi?id=638225

https://bugzilla.novell.com/show_bug.cgi?id=638225#c0


           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: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          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:

n/a

-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to