bugDotGNU Portable.NET - Bugs: bug #10058, cscc bug with enums and the...

 
 

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

bug #10058: cscc bug with enums and the bitwise OR operator | for integral types

Submitted by:  None
Submitted on:  Wed 18 Aug 2004 11:26:28 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu 09 Sep 2004 03:43:45 PM UTC, comment #2:

Fixed in CVS 9th Sept 2004

Gopal.V <t3rmin4t0r>
Project Administrator
Thu 09 Sep 2004 02:38:28 PM UTC, comment #1:

The ECMA spec does not mention enum initializers as a special case, while Enum '|' Int is invalid in normal expressions.

Gopal.V <t3rmin4t0r>
Project Administrator
Wed 18 Aug 2004 11:26:28 PM UTC, original submission:

Compiling the following with cscc version 0.6.8 produces an error.

            • Test.cs ******

using System;

public class Test
{
public enum Foo
{
TabFocus = 0x1,
NoFocus = 0,
StrongFocus = TabFocus | ClickFocus | 0x8,
WheelFocus = StrongFocus | 0x4,
ClickFocus = 0x2
}

public static void Main (String[] args)
{
Console.WriteLine ("test");
}
}

            • Error by cscc ******

test.cs:9: invalid operands to binary `|'
test.cs:9: constant value required
test.cs:10: invalid operands to binary `|'
test.cs:10: constant value required

            • Expected result ******

Should compile without any errors.

Anonymous

 

No files currently attached

 

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
Thu 09 Sep 2004 03:43:45 PM UTCt3rmin4t0rStatusNone=>Fixed
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1