* class.cs: Handle error 549: do not allow virtual methods in
sealed classes.
svn path=/trunk/mcs/; revision=13366
+2003-01-30 Miguel de Icaza <miguel@ximian.com>
+
+ * class.cs: Handle error 549: do not allow virtual methods in
+ sealed classes.
+
2003-02-01 Jackson Harper <jackson@latitudegeo.com>
* decl.cs: Check access levels when resolving types
if (MemberType == null)
return false;
+ if ((parent.ModFlags & Modifiers.SEALED) != 0){
+ if ((ModFlags & (Modifiers.VIRTUAL|Modifiers.ABSTRACT)) != 0){
+ Report.Error (549, Location, "Virtual method can not be contained in sealed class");
+ return false;
+ }
+ }
+
// verify accessibility
if (!parent.AsAccessible (MemberType, ModFlags)) {
if (this is Property)