[Mono-bugs] [Bug 82490][Nor] Changed - ContextStatic variable initializer doesn't work

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Aug 20 07:49:10 EDT 2007


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 robertj at gmx.net.

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

--- shadow/82490	2007-08-19 15:55:38.000000000 -0400
+++ shadow/82490.tmp.24262	2007-08-20 07:49:10.000000000 -0400
@@ -1,22 +1,21 @@
 Bug#: 82490
 Product: Mono: Runtime
 Version: 1.2
-OS: 
+OS: unknown
 OS Details: 
-Status: NEW   
-Resolution: 
-Severity: 
+Status: RESOLVED   
+Resolution: NOTABUG
+Severity: Unknown
 Priority: Normal
 Component: remoting
 AssignedTo: lluis at ximian.com                            
 ReportedBy: jan.oravec at 6com.sk               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
-Cc: 
 Summary: ContextStatic variable initializer doesn't work
 
 The per-context variable, like:
 
 [ContextStatic]
 static int foo = 10;
@@ -143,6 +142,13 @@
 
 should probably be
 
                 if (T.var != 5) return true;
 
 as var has initializer var = 5
+
+------- Additional Comments From robertj at gmx.net  2007-08-20 07:49 -------
+This is by design and it happens to match MS.NET as well.
+
+[ContextStatic] has the same semantic like [ThreadStatic],
+which means that the field gets initialized only once.
+


More information about the mono-bugs mailing list