http://bugzilla.novell.com/show_bug.cgi?id=612659
http://bugzilla.novell.com/show_bug.cgi?id=612659#c0 Summary: ICE in type inferencing Classification: Mono Product: Mono: Compilers Version: SVN Platform: x86-64 OS/Version: openSUSE 11.2 Status: NEW Severity: Normal Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- Internal compiler error with some type inferencing. Compile the following code: using System; using System.ComponentModel; using System.Linq.Expressions; using Cadenza.ComponentModel; namespace Cadenza.ComponentModel { public static class NotifyingProperty { public static void CreateDependent<TValue>( Expression<Func<TValue>> property, Func<PropertyChangedEventHandler> notifier, params Expression<Func<object>>[] dependents) { } } } namespace Cadenza.ComponentModel.Tests { public class NotifyingPropertyTest { public void CreateDependent_NotifierNull () { int v = 0; NotifyingProperty.CreateDependent (() => v, null); } public void CreateDependent_DependentsNull () { Expression<Func<object>>[] dependents = null; int v = 0; NotifyingProperty.CreateDependent (() => v, () => null, dependents); } } } Actual results: f.cs(27,27): error CS0584: Internal compiler error: Array index is out of range. f.cs(27,27): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement f.cs(34,27): error CS0584: Internal compiler error: Array index is out of range. f.cs(34,27): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement Expected results: compilation succeeded. Workaround: remove the type inferencing, by using NotifyingProperty.CreateDependent<int>() instead of NotifyingProperty.CreateDependent(). -- Configure bugmail: http://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
