https://bugzilla.novell.com/show_bug.cgi?id=479776
Summary: gmcs generates bad image for generic type nested from
another generic type
Classification: Mono
Product: Mono: Compilers
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6)
Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
The repro code shows a nested generic class inside another generic class, which
results in runtime error on both .NET and Mono runtimes.
Probably typeof expression emits bad image.
Reproducible: Always
Steps to Reproduce:
Compile and run the repro with gmcs. To compare the difference, you might want
to try csc.
using System;
class C : C1<string>
{
public static void Main ()
{
Console.WriteLine (t);
}
}
class C1<T>
{
class C2<U> {}
public static Type t =
typeof (C2<>).MakeGenericType (typeof (int), typeof (int));
// public static Type t = typeof (C1<int>.C2<int>); -> OK
}
Actual Results:
** ERROR **: VAR (1) cannot be expanded in this context with 1 instantiations
aborting...
Expected Results:
print C1`1+C2`1[System.Int32,System.Int32]
--
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