bugDotGNU Portable.NET - Bugs: bug #11419, Bad error message: Enum needs to...

 
 

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

bug #11419: Bad error message: Enum needs to be derived from ValueType, IComparable, IConvertible, IFormattable

Submitted by:  James Michael DuPont <mdupont>
Submitted on:  Tue 28 Dec 2004 05:39:41 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue 02 Aug 2005 01:40:52 PM UTC, comment #1:

The error message is correct as per the specs.

Deryk Robosson <drobosson>
Project Member
Tue 28 Dec 2004 05:39:41 PM UTC, original submission:

cscc /nowarn:649 /nowarn:169 -d:INSIDE_CORLIB -d:NET_1_1 -d:ONLY_1_1 -g /noconfig /unsafe /nostdlib /target:library ../../testcase3.c
produces the error :
../../testcase3.cs:19: enumerated value is not constant
When trying to set the value of an enum.
the error is misleading.
------------------------------------------
namespace System
{
public class Object
{
}
public class ValueType
{
}
public interface IComparable { }
public interface IConvertible { }
public interface IFormattable { }
public abstract class Enum// : ValueType, IComparable, IConvertible, IFormattable
{
}
public enum AttributeTargetstest
{
test,
test2=0x000032, //../../testcase3.cs:19: enumerated value is not constant
All
}
}

James Michael DuPont <mdupont>

 

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
Tue 02 Aug 2005 01:40:52 PM UTCdrobossonStatusNone=>Invalid
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1