[Mono-bugs] [Bug 545584] New: new <type> {...} constructors works wrong with assignments in some cases
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Oct 8 18:46:31 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=545584
Summary: new <type> {...} constructors works wrong with
assignments in some cases
Classification: Mono
Product: Mono: Compilers
Version: 2.4.x
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: rush.william at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=321742)
--> (http://bugzilla.novell.com/attachment.cgi?id=321742)
error demontration
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3)
Gecko/20090920 Gentoo Firefox/3.5.3
in constructions like:
somevar = new Someclass { SomeField = somevar }
gmcs performs assignment new instance before SomeField is assigned to old
value. As the result SomeField is assigned to newly created instance, not to
old value of somevar.
See example attached.
Reproducible: Always
Steps to Reproduce:
1. Download the example
2. gmsc test.cs
3. mono test.exe
Actual Results:
for mono:
Buggy new T {...}: Yes
Expected Results:
for MS csc:
Buggy new T {...}: No
--
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