uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

E016 Non Immutable Superclass

Umple semantic error reported when an immutable class is defined as having a superclass that is non-immutable.

In an inheritance hierarchy, all classes must be immutable, or all non-immutable, otherwise the substitutability principle would broken.

Example

// The following example generates the error message
// A solution is to make class X immutable
class X {
  a;
}
class Y {
  immutable;
  isA X;
}
      

Load the above code into UmpleOnline