uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

E214 Two Identical Parameter Names

Umple semantic error related to having two identical template parameter names

When defining traits, it is possible to define template parameters for traits. The names of these parameters should be unique in order to let the compiler perform the correct binding for them. Therefore, when there are two or more template parameters, the Umple compiler detects it as an error.

Example

// In this example, there is an error because class "A" tries to remove method "show(String)" while it tries to change its name. This is a contradiction.
class A{
	isA T1<+show(Integer), -show(String) as t >;
}
trait T1{
	void show(String str){
	//Implementation
	}
	void show(Integer inData){
	//Implementation
	}
	void show(String str,Integer inData){
	//Implementation
	}
}

      

Load the above code into UmpleOnline