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

User Manual    [Previous]   [Next]   

E012 Class Indirectly Subclass of Self

Umple semantic error reported when a class is designated as a subclass of itself, through some other class.

The inheritance hierarchy cannot have cycles. It must be a strict tree. It is therefore not allowed to make a cycle or loop, in which a class is indirectly a subclass of itself.

Example

// This example generates the error message
class A {
  isA C;
}

class B {
  isA A;
}

class C {
  isA B;
}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

// The following shows how to avoid the error
class A {
}

class B {
  isA A;
}

class C {
  isA B;
}
      

Load the above code into UmpleOnline