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

User Manual    [Previous]   [Next]   

E205 Cycle in Traits

Umple semantic error related to a cycle of trait use

In Umple, traits cannot be used in an explicit or implicit cyclic way. This means that a trait cannot use itself and it also cannot be used in a cyclic hierarchy. This error happens when a hierarchy is created completely based on traits. Moreover, this issue generally arises because of invalid design or error in typing a trait name.

Example

// In this example, there is a cycle
// created in a hierarchy.
class A{
	isA T;
}

trait T{
  isA T1;
}
trait T1{
	isA T;
}
      

Load the above code into UmpleOnline