[Mono-bugs] [Bug 364670] New: InvalidCastException in Mono.CSharp.Attribute. ResolveConstructor

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Feb 25 16:30:09 EST 2008


           Summary: InvalidCastException in
           Product: Mono: Compilers
           Version: 1.2.6
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: lauren.bedoule at gmail.com
         QAContact: mono-bugs at lists.ximian.com
                CC: lauren.bedoule at gmail.com
          Found By: ---

I got an InvalidCastException while compiling a code that can compile using csc
Here's the mcs trace output:

Internal compiler error at Test.cs:: exception caught while emitting
MethodBuilder [Test::GetReferences]

Unhandled Exception: System.InvalidCastException: Cannot cast from source type
o destination type.
  at Mono.CSharp.Attribute.ResolveConstructor (Mono.CSharp.EmitContext ec)
  at Mono.CSharp.Attribute.Resolve () [0x00000]
  at Mono.CSharp.Attribute.GetAttributeUsageAttribute () [0x00000]
  at Mono.CSharp.Attribute.GetAttributeUsage (System.Type type) [0x00000]
  at Mono.CSharp.Attribute.Emit (System.Collections.Specialized.ListDictionary
llEmitted) [0x00000]
  at Mono.CSharp.Attributes.Emit () [0x00000]
  at Mono.CSharp.MethodOrOperator.Emit () [0x00000]
  at Mono.CSharp.Method.Emit () [0x00000]

Note the method Test::GetReferences is tagged like this:
internal extern object[] GetReferences();

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