[Mono-bugs] [Bug 67042][Nor] Changed - Compiler crash with static string a; string b = a + "x"

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 2 Nov 2004 17:26:53 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by miguel@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=67042

--- shadow/67042	2004-09-30 16:40:54.000000000 -0400
+++ shadow/67042.tmp.32158	2004-11-02 17:26:53.000000000 -0500
@@ -81,6 +81,19 @@
 
 ------- Additional Comments From jluke@cfl.rr.com  2004-09-30 16:40 -------
 The above seems to fix it without breaking anything, but I am not sure
 it is correct. It just uses the as keyword to cast and only tries to
 convert it from Expression to Argument if it is not null (because it
 is already an Argument at least in this case, maybe always?).
+
+------- Additional Comments From miguel@ximian.com  2004-11-02 17:26 -------
+The problem is that the StringConcat expression is mutating the
+object during the Emit phase.
+
+And it happens that we invoke the same expression to be emitted
+once for each constructor defined, so the correct fix is to make
+StringConcat not mutate its data, and allow for multiple emissions.
+
+Ben is looking at this.
+
+This is not easy, because in general, it means that we should ensure
+that Emit in every Expression is non mutating.