two issues with chain-up on abstract methods
Submitted by Allison (desrt)
Link to original bug (#674363)
Description
consider this silly code:
public abstract class Parent {
public abstract void a ();
}
public class Child : Parent {
public override void a () {
base.a();
}
}
First issue: in this particular case the compiler should be clever enough to know that base.a() is not valid; it remains silent on this issue though and produces code.
It's probably not possible to deal with this in the compiler in every imaginable case, but in this simple case we should have at least a warning, if not an error.
Second issue: the generated code tells a lie when you run it:
** (process:19808): CRITICAL **: Type `Child' does not implement abstract method `parent_a'
...when clearly it does.
An understandable lie, but we should probably either reword it or explicitly check that it's true before printing it (and possibly print another message telling the user not to chain-up in the other case).
Edited by Rico Tzschichholz