bugDotGNU Portable.NET - Bugs: bug #2544, csc 0.5.2: code for initializing a...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #2544: csc 0.5.2: code for initializing a readonly static variable is misplaced

Submitted by:  Yannis BRES <yannis_bres>
Submitted on:  Thu 13 Feb 2003 01:37:06 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 14 Feb 2003 02:04:42 PM UTC, comment #1:

now it's

.method private static hidebysig specialname rtspecialname void '.cctor'() cil managed
{
ldc.i4.1
stsfld bool 'Readonly'::'flag'
ldc.i4.0
stsfld bool 'Readonly'::'flag'
ret
.maxstack 1
} // method .cctor

the patch is moving into CVS as we speak

Gopal.V <t3rmin4t0r>
Project Administrator
Thu 13 Feb 2003 01:37:06 PM UTC, original submission:

The code that initializes a static readonly variable to the value specified along with the variable definition is inserted at the end of the static class constructor, although it should be inserted at the beginning : the value of readonly variables can be changed by the static constructor...
The static class constructor for the attached example is :
ldc.i4.0
stsfld bool Readonly::flag
ldc.i4.1
stsfld bool Readonly::flag
Best regards,
Yannis

Yannis BRES <yannis_bres>

 

Attached Files
file #294:  Readonly.cs added by yannis_bres (257B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 14 Feb 2003 02:04:42 PM UTCt3rmin4t0rStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1