[Mono-bugs] [Bug 383444] New: typeof (Type<>) fails when used in custom attribute constructor.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Apr 24 12:53:16 EDT 2008


           Summary: typeof (Type<>) fails when used in custom attribute
           Product: Mono: Runtime
           Version: SVN
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jan.oravec at 6com.sk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

The following code fails with error

** (./a.exe:24838): WARNING **: Cannot load type 'B`1[T]'

Constructor of attribute A gets null instead of generic type definition.

[ A (typeof (B<>)) ]
public class A : System.Attribute
  static int ret = 1;

  public A (System.Type type)
    if (type == typeof (B<>))
      ret = 0;

  public static int Main ()
    typeof (A).GetCustomAttributes (true);
    return ret;

class B<T>

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