https://bugzilla.novell.com/show_bug.cgi?id=392155
Summary: C# parser gets confused when casting the result of
byte.Parse
Product: Mono: Compilers
Version: unspecified
Platform: x86
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: Other
Code:
using System;
public class Foo
{
enum _DataType : byte {Foop}
public static void Main(string[] args)
{
_DataType dt = (_DataType)byte.Parse("123");
}
}
[EMAIL PROTECTED] ~ $ gmcs t.cs
t.cs(8,35): error CS1002: Expecting `;'
Compilation failed: 1 error(s), 0 warnings
If I capitalize the 'byte' in 'byte.Parse', it compiles successfully.
Similarly, if I put an extra set of parenthesis around byte.Parse("123") it
compiles successfully. Something about byte being a type seems to be confusing
the compiler.
This compiles successfully on the microsoft toolchain(s).
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs