bugDotGNU Portable.NET - Bugs: bug #4196, cscc allows overrides when there...

 
 

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

bug #4196: cscc allows overrides when there is nothing to override

Submitter:  Thong Nguyen <tum>
Submitted:  Sat 05 Jul 2003 12:59:13 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Sat 05 Jul 2003 04:10:18 AM UTC, comment #1: 

Fix committed to CVS - 5 July 2003

Rhys Weatherley <rweather>
Group administrator
Sat 05 Jul 2003 12:59:13 AM UTC, original submission:  

The following should give a compiler error.  You can't override a method that doesn't exist.  You should also not be able to override a method that hasn't been declared as "virtual".

using System;
using System.Collections;

public class Test
{
        public class A
        {
        }

        public class B
                : A
        {
                public override IEnumerator GetEnumerator()
                {
                        return null;
                }
        }

        public static void Main()
        {
        }
}


Thong Nguyen <tum>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2003-07-05 rweather StatusNone None
    Open/ClosedOpen None

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code