[Mono-bugs] [Bug 479532] New: Null field with object initializer
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Feb 25 09:11:07 EST 2009
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: mono-bugs at lists.ximian.com
ReportedBy: stapostol at gmail.com
QAContact: mono-bugs at lists.ximian.com
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.
More information about the mono-bugs
mailing list