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

User Manual    [Previous]   [Next]   

E215 Template Parameter Not Available

Umple semantic error related to binding a template parameter of a trait which is not available

When using traits, we can bind types to template parameters. In the process of binding, we can just refer to the name of the parameters which are available. The Umple compiler detects cases in which there are template parameters that are not defined in a trait.

Example

// In this example, there is an error
// because class A cannot bind
// type String to template parameter Y,
// which is not defined. for trait T.
class A{
  isA T< X= Integer, Y = String>;
}
trait T<X>{
	X variable;
}
      

Load the above code into UmpleOnline