OOP_public methods shall be overridden only by public methods
Submitted by Elemer Lelik
Link to original bug (#568716)
Description
The below code snippet
/***************************************************************** ** @author STF 572 ** @version 0.0.1 ** @purpose 5.1.1.7, Ensure that public methods shall be overridden only by public methods. ** @verdict pass reject *****************************************************************/ module NegSem_5010107_Methods_001 "TTCN-3:2018 Object-Oriented" {
type component GeneralComp {
}
type class MySuperClass {
var octetstring v_o;
public function doSomething() return integer {
return oct2int(this.v_o);
}
}
type class MySubClass extends MySuperClass {
private function doSomething() return integer { //not allowed error should be thrown here !!!
return 1;
}
}
//….
}
compiles, although it shouldn't.
Version: 7.1.0