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

User Manual    [Previous]   [Next]   

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 of the same name, 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