uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

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

 

Another Example

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

class B {
  isA A;
}

class C {
  isA B;
}

      

Load the above code into UmpleOnline