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

Submitted by:  Thong Nguyen <tum>
Submitted on:  Sat 05 Jul 2003 12:59:13 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned 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>
Project 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>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 05 Jul 2003 04:10:18 AM UTCrweatherStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1