bugDotGNU Portable.NET - Bugs: bug #1456, Compiler: Enum resolution bug

 
 

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

bug #1456: Compiler: Enum resolution bug

Submitted by:  Gopal.V <t3rmin4t0r>
Submitted on:  Sat 19 Oct 2002 11:32:00 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Sun 03 Nov 2002 04:04:30 PM UTC, comment #1:

By Roberth ... thanks man !

Gopal.V <t3rmin4t0r>
Project Administrator
Sat 19 Oct 2002 11:32:00 AM UTC, original submission:

Blah.cs:
public enum Blah
{
Read=1,
Write=2,
ReadWrite=Read|Write
}

Foo.cs
public class Foo
{
public static void Bah(Blah x)
{
}
public static void Main()
{
Bah(Blah.ReadWrite);
}
}

bash$ cscc Foo.cs Blah.cs
Blah.cs:5: `Read' is not declared in the current scope
Blah.cs:5: `Write' is not declared in the current scope
Blah.cs:6: invalid operands to binary `|'
Blah.cs:6: constant value required
Blah.cs:6: enumerated value is not constant
Foo.cs:8: literal field does not have a constant value

trying to fix myself

Gopal.V <t3rmin4t0r>
Project Administrator

 

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
Sun 03 Nov 2002 04:04:30 PM UTCt3rmin4t0rStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1