/***************************************************
 ** @author   STF 409
 ** @version  0.0.1
 ** @purpose  1:6.3.3, Ensure that the IUT correctly handles component incompatibility due to differing constant types having same name
 ** @verdict  pass reject
 ***************************************************/

module NegSem_060303_component_types_002 {

    type integer ConstrainedInteger(0..10);

    type component TestCaseComp {
        const integer c_integer:=2;
        const integer c_constrained:=2;
    }

    type component FunctionComp {
        const integer c_integer:=2;
        const ConstrainedInteger c_constrained:=2;
    }

    function f_testFunction(integer p_arg) runs on FunctionComp return integer {

        var integer v_result;
        v_result:=p_arg*c_integer;
        return v_result;
    }

    testcase TC_NegSem_060303_component_types_002() runs on TestCaseComp {

        var integer v_int:=1;

        f_testFunction(v_int);

        setverdict(fail, "Error expected: as component types are not compatible since their definitions are not identical.");
    }

    control {
        execute(TC_NegSem_060303_component_types_002());
    }

}
