https://bugzilla.novell.com/show_bug.cgi?id=479532
Summary: Null field with object initializer
Classification: Mono
Product: Mono: Compilers
Version: 2.4.x
Platform: x86
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Found By: ---
User-Agent: Opera/9.63 (X11; Linux x86_64; U; el) Presto/2.1.1
struct Foo { public int[] Data; }
var foo = new Foo() { new int[] { 1, 2, 3 } }.Data;
Console.WriteLine(foo.Data != null);
Console.WriteLine(new Foo() { new int[] { 1, 2, 3 } }.Data != null);
The second test prints True when compiled with csc, but prints False when
compiled with gmcs (both Mono 2.2 and 2.4RC1).
Reproducible: Always
Steps to Reproduce:
1. Compile and run Test.cs w/ csc .Net - prints true on both tests.
2. Compile and run Test.cs w/ gmcs - prints true on first test and false on
second.
--
Configure bugmail: https://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