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: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs