[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


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


           Summary: InvalidCastException in
                    Mono.CSharp.Attribute.ResolveConstructor
           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
compiler.
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
t
o destination type.
  at Mono.CSharp.Attribute.ResolveConstructor (Mono.CSharp.EmitContext ec)
[0x00
000]
  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
a
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:
[MethodImpl(MethodImplOptions.InternalCall)]
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