bugDotGNU Portable.NET - Bugs: bug #1774, cscc - enum to IntPtr casting

 
 

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

bug #1774: cscc - enum to IntPtr casting

Submitted by:  François-Denis Gonthier <Neumann>
Submitted on:  Thu 21 Nov 2002 11:49:56 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 22 Nov 2002 07:24:36 AM UTC, comment #1:

[gopal@mushroom tests]$ cscc intptrcast.cs
[gopal@mushroom tests]$ ./a.out.exe
You shouldn't see this: 0
[gopal@mushroom tests]$

Gopal.V <t3rmin4t0r>
Project Administrator
Thu 21 Nov 2002 11:49:56 PM UTC, original submission:

this simple program compiles fine with csc but fails with cscc (and mcs ;)

using System;

public class EnumCast {

public enum SomeEnum {
Member1,
Member2
}

public static void SomeFunction(IntPtr ParamVar) {
Console.WriteLine("You shouldn't see this: " + ParamVar.ToInt32());
}

public static void Main(string[] args) {
SomeFunction((IntPtr)SomeEnum.Member1);
}
}

enum_cast.cs:15: cannot cast from `SomeEnum' to `System.IntPtr'
neumann@MinasTirith:~/monocvs$

François-Denis Gonthier <Neumann>

 

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
Fri 22 Nov 2002 07:24:36 AM UTCt3rmin4t0rStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1