/*****************************************************************
 ** @author  STF 572
 ** @version 0.0.1
 ** @purpose 5.1.1.10, Ensure that a field of any visibility cannot be overridden in a subclass.
 ** @verdict pass reject
*****************************************************************/
module NegSem_5010110_Visibility_002 language "TTCN-3:2018 Object-Oriented" {

    type component GeneralComp {
    }

    type charstring MyType;

    type class MySuperClass {
        private var MyType v_my;
    }

    type class MySubClass extends MySuperClass {
        var MyType v_my; //not allowed
    }

    testcase TC_NegSem_5010110_Visibility_002() runs on GeneralComp {
        var MySubClass v_a := MySubClass.create("abc");
        if (v_a.v_my == "abc") {
            setverdict(pass);
        } else {
            setverdict(fail);
        }
    }

    control {
        execute(TC_NegSem_5010110_Visibility_002());
    }
}