[Mono-bugs] [Bug 678897] New: Expression<Func<Test, Enum>> expr = u => u.EnumProperty; crashes
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Mar 11 09:51:24 EST 2011
https://bugzilla.novell.com/show_bug.cgi?id=678897
https://bugzilla.novell.com/show_bug.cgi?id=678897#c0
Summary: Expression<Func<Test, Enum>> expr = u =>
u.EnumProperty; crashes
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: i386
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Core
AssignedTo: jbevain at novell.com
ReportedBy: zaxeeq at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=418874)
--> (http://bugzilla.novell.com/attachment.cgi?id=418874)
Test code which crashes
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.127 Safari/534.16
When you use System.Enum as Func result, then the assignment fails.
Reproducible: Always
Steps to Reproduce:
1. Create enum
public enum ETest {
A,
B,
C
}
2. Create a class with property of type ETest
public class Test {
public ETest EnumProperty {
get;
set;
}
}
3. Create the expresssion
Expression<Func<Test, Enum>> expr = u => u.EnumProperty;
Actual Results:
Throws exception:
System.InvalidOperationException: Operation is not valid due to the current
state of the object
Expected Results:
Successful assignment to variable.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list