[Mono-bugs] [Bug 612659] New: ICE in type inferencing
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jun 8 16:22:09 EDT 2010
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: mono-bugs at lists.ximian.com
ReportedBy: jpryor at novell.com
QAContact: mono-bugs at lists.ximian.com
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.
More information about the mono-bugs
mailing list