list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

E219 No Binding for Parameters

Umple semantic error related to having two same template parameter names

When defining traits, it is possible to define template parameters for traits. It means when traits with template parameters are going to be used by classes or traits, they must bind values for the parameters. If there is no binding for a parameter, the Umple compiler raises an error and shows which parameter does not have a value.

Example

// In this example, there is an error
// because class "A" doesn't bind
// a value to one of the template
// parameters of trait "T" named "Y".
class A{
	isA T<X = B>;
}
class B{
	//elements
}
trait T<X,Y>{
	//elements
}
      

Load the above code into UmpleOnline

 

Another Example

// In this example, there is an error
// because class "A" doesn't bind
// a value to template parameters
// of trait "T".
class A{
	isA T;
}
class B{
	//elements
}
trait T<X,Y>{
	//elements
}
      

Load the above code into UmpleOnline