[Mono-bugs] [Bug 58687][Blo] Changed - NotOverridable Subs

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 3 Jun 2004 05:51:14 -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 banirban@novell.com.

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

--- shadow/58687	2004-06-03 05:33:07.000000000 -0400
+++ shadow/58687.tmp.8048	2004-06-03 05:51:14.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 58687
 Product: Mono: Compilers
 Version: unspecified
 OS: Red Hat 9.0
 OS Details: 
-Status: NEW   
-Resolution: 
+Status: RESOLVED   
+Resolution: NOTABUG
 Severity: Unknown
 Priority: Blocker
 Component: Basic
 AssignedTo: banirban@novell.com                            
 ReportedBy: jwezel@compumaster.de               
 QAContact: mono-bugs@ximian.com
@@ -33,6 +33,32 @@
 Cannot be declared NotOverridable since this method is not maked as 
 Overrides (0,0) : error failed: 2 Error(s), 0 warnings 
 
 
 How often does this happen? 
 Everytime
+
+------- Additional Comments From banirban@novell.com  2004-06-03 05:51 -------
+This doesn't look like a bug rather a check provided by mbas compiler.
+
+NotOveridable will work if implemented it in following fashion
+
+Class B
+    Public Overridable Sub F1()
+    End Sub
+End Class
+
+Class D
+    Inherits B
+
+    Public NotOverridable Overrides Sub F1()
+    End Sub
+End Class
+
+If a class is derived from another which contains a Overridable sub 
+or function then that particular sub/function can be declared 
+NotOverridable to prevent Overriding in the next level.
+
+By default every public function/sub is NotOverridable hence the 
+compiler doesn’t entertain specifying the same modifier explicitly 
+and returns the exception what you are getting.
+