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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=76482 --- shadow/76482 2005-10-19 14:20:59.000000000 -0400 +++ shadow/76482.tmp.1567 2005-10-19 14:20:59.000000000 -0400 @@ -0,0 +1,55 @@ +Bug#: 76482 +Product: Mono: Compilers +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: [GMCS] gmcs emits extraneous base interfaces as generic parameter constraints + +The code below shows all of the generic parameter constraints for a generic +argument of a generic method. + +using System; +using System.Reflection; + +public interface IFoo : ICloneable {} + +public class Test +{ + public void Foo<T> () where T : IFoo {} + + public static void Main () + { + foreach (Type t in typeof (Test).GetMethod ("Foo") + .GetGenericArguments () [0] // T + .GetGenericParameterConstraints ()) + Console.WriteLine (t); + } +} + +Actual Results: + +When it is compiled with gmcs and run, it outputs "IFoo" and "ICloneable". + +Expected Results: + +With csc, it only outputs "IFoo". + +How often does this happen? + +consistently. + +Additional Information: + +It is not a runtime/classlib matter but gmcs matter (gmcs-compiled binary +shows ICloneable on .NET). _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
