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 trait T has two template parameters with the same name.
trait T<TP,TP>{  
  TP name;
}
class C1{ 
  isA T;
}

      

Load the above code into UmpleOnline