/******************************************************************************
 * Copyright (c) ETSI 2017.
 *
 * This file is subject to copyrights owned by ETSI. Non-exclusive permission
 * is hereby granted, free of charge, to copy, reproduce and amend this file
 * under the following conditions: It is provided "as is", without warranty of any
 * kind, expressed or implied.
 * 
 * ETSI shall never be liable for any claim, damages, or other liability arising
 * from its use or inability of use.This permission does not apply to any documentation
 * associated with this file for which ETSI keeps all rights reserved. The present
 * copyright notice shall be included in all copies of whole or part of this
 * file and shall not imply any sub-license right.
 *
 * Modified by: Adrien Kirjak
 *
 ** @version  0.0.1
 ** @purpose  1:6.2.10, Ensure that extending a component that occurs name clash is not allowed
 ** @verdict  pass reject, noexecution
 *****************************************************************/

/* The following requirements are tested:
 * Restriction b.: When defining component types by extending more than one parent type,
 * there shall be no name clash between the definitions of the different parent types
 */

module NegSyn_060210_ReuseofComponentTypes_002 {
 
    type port loopbackPort message {
        inout integer;
        inout float;
    } with {extension "internal"}
     
 	type component MyCompA {
      	port loopbackPort pt_myPortA;
    }
    

 	type component MyCompB  {
      	var integer MyInt;
    }
    
 	type component GeneralComp extends MyCompA, MyCompB { 
        port loopbackPort pt_myPortB;
        var integer MyInt;    //error: name clash
    }
    
    testcase TC_NegSyn_060210_ReuseofComponentTypes_002() runs on GeneralComp {
      
     	pt_myPortA.send(2);
     	pt_myPortB.send(2.0);
  	} 

    control{
        execute(TC_NegSyn_060210_ReuseofComponentTypes_002());
    }
}
