[Mono-bugs] [Bug 44770][Nor] New - mcs does not permit unsafe modified for destructor

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 13 Jun 2003 19:08:22 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by mathpup@mylinuxisp.com.

http://bugzilla.ximian.com/show_bug.cgi?id=44770

--- shadow/44770	Fri Jun 13 19:08:22 2003
+++ shadow/44770.tmp.21774	Fri Jun 13 19:08:22 2003
@@ -0,0 +1,68 @@
+Bug#: 44770
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mathpup@mylinuxisp.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs does not permit unsafe modified for destructor
+
+Description of Problem: 
+ 
+According to ECMA 335 section 25.1, in unsafe mode the syntax for destructors is 
+extended to permit "unsafe" to be applied to destructors, but mcs complains about a 
+parse error. (csc does permit this.) 
+ 
+ 
+Steps to reproduce the problem: 
+1. mcs -unsafe unsafe.cs 
+ 
+ 
+Actual Results: 
+ 
+syntax error, expecting ABSTRACT BOOL BYTE CHAR CLASS CONST DECIMAL 
+DELEGATE DOUBLE ENUM EVENT EXPLICIT EXTERN FLOAT IMPLICIT INT INTERFACE 
+INTERNAL LONG NEW OBJECT OVERRIDE PRIVATE PROTECTED PUBLIC READONLY 
+SBYTE SEALED SHORT STATIC STRING STRUCT UINT ULONG UNSAFE USHORT 
+VIRTUAL VOID VOLATILE IDENTIFIER 
+unsafe.cs(4) error CS8025: : Parsing error 
+Mono.CSharp.yyParser.yyException: irrecoverable syntax error 
+in <0x00865> 00 Mono.CSharp.CSharpParser:yyparse 
+(Mono.CSharp.yyParser.yyInput) 
+in <0x00079> 00 Mono.CSharp.CSharpParser:parse () 
+ 
+Compilation failed: 1 error(s), 0 warnings 
+ 
+ 
+Expected Results: 
+ 
+No errors 
+ 
+ 
+How often does this happen?  
+ 
+Always 
+ 
+ 
+Additional Information: 
+ 
+Test case: 
+ 
+public class MyClass 
+{ 
+    unsafe ~MyClass() 
+    { 
+    } 
+    public static void Main() 
+    { 
+    } 
+}