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

User Manual    [Previous]   [Next]   

E222 Satisfaction of Required Interfaces

Umple semantic error related to satisfaction of required interfaces of traits

When a class uses traits, it needs to implement the required interfaces of those traits, otherwise, the Umple compiler detects missing interfaces and raises this error code. If a trait uses other traits with required interfaces, those required interfaces are added to the set of required interfaces of the trait and final clients are required to implement all of those required interfaces as well.

Example

// In this example, there is an error
// because class C must implement
// required interface of trait T,
// which is interface I.
trait T{
  /*implementation*/
  isA I;
}
interface I{
  /*implementation*/
}
class C{
  isA T;
  /*implementation*/
}
      

Load the above code into UmpleOnline