https://bugzilla.novell.com/show_bug.cgi?id=661984
https://bugzilla.novell.com/show_bug.cgi?id=661984#c0 Summary: Compiler crashes (InternalErrorException -> ArgumentException) in a "very special case" Classification: Mono Product: Mono: Compilers Version: 2.8.x Platform: All OS/Version: SLED 11 Status: NEW Severity: Normal Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 Compiler crashes when trying to build a class witch descend from another which as a "auto-related" generic parameter. This only happens when the descendant class overrides a Parent method. Sorry I couldn't explain better, please see the code bellow so you'll find out what I mean. Reproducible: Always Steps to Reproduce: 1. Build the following code: using System; using System.Linq; using System.Linq.Expressions; namespace BuildTest { class Dummy<T> {} abstract class GranParent<T> { public virtual Dummy<T1> Test<T1>(Expression<Func<T, T1>> p) { return new Dummy<T1>(); } } abstract class Parent<T, P> : GranParent<T> where P : Parent<T, P> { } class Child<T> : Parent<T, Child<T>> { public override Dummy<T1> Test<T1>(Expression<Func<T, T1>> p) { return base.Test<T1>(p); } } } --- Compiler outputs: Unhandled Exception: Mono.CSharp.InternalErrorException: /home/mira/develop/test/BuildTest/Main.cs(19,15): BuildTest.Child<T> ---> Mono.CSharp.InternalErrorException: /home/mira/develop/test/BuildTest/Main.cs(21,43): BuildTest.Child<T>.Test<T1>(System.Linq.Expressions.Expression<System.Func<T,T1>>) ---> System.ArgumentException: Invalid arguments 2-a. If the class Child doesn't override the method the compiler does fine. 2-b. If the class Child is changed to "class Child<T> : GranParent<T>" the compiler does fine. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
