[Mono-bugs] [Bug 81250][Nor] Changed - Mono fails to compile code which uses implicit generic instantiation
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Mar 28 11:04:55 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by mhabersack at novell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=81250
--- shadow/81250 2007-03-28 06:48:26.000000000 -0500
+++ shadow/81250.tmp.24060 2007-03-28 10:04:55.000000000 -0500
@@ -1,14 +1,14 @@
Bug#: 81250
Product: Mono: Compilers
Version: 1.2
-OS:
+OS: unknown
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: C#
AssignedTo: rharinath at novell.com
ReportedBy: mhabersack at novell.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
@@ -20,6 +20,35 @@
compiles fine on MS.NET. Tested with svn head.
------- Additional Comments From mhabersack at novell.com 2007-03-28 06:48 -------
Created an attachment (id=18962)
test.cs
+
+------- Additional Comments From mhabersack at novell.com 2007-03-28 10:04 -------
+MS.NET seems to infer the method's T type from the method parameters
+which use T. E.g. if in the attached test case List<string> would be
+replaced with List<MyClass>, MS.NET would instantiate the TestMethod
+with <MyClass>:
+
+IL_0000: nop
+ IL_0001: newobj instance void class App/MyClass::.ctor()
+ IL_0006: stloc.0
+ IL_0007: newobj instance void class
+[mscorlib]System.Collections.Generic.List`1<class App/MyClass>::.ctor()
+ IL_000c: stloc.1
+ IL_000d: ldstr "Some format {0}"
+ IL_0012: ldloc.1
+ IL_0013: ldc.i4.1
+ IL_0014: newarr App/MyClass
+ IL_0019: stloc.2
+ IL_001a: ldloc.2
+ IL_001b: ldc.i4.0
+ IL_001c: ldloc.0
+ IL_001d: stelem.ref
+ IL_001e: ldloc.2
+ IL_001f: call void class App::TestMethod<class App/MyClass>
+(string, class [mscorlib]System.Collections.Generic.List`1<!!0>, clas
+s App/MyClass[])
+ IL_0024: nop
+ IL_0025: ret
+
More information about the mono-bugs
mailing list