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

User Manual    [Previous]   [Next]   

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