list of dots

User Manual    [Previous]   [Next]   

E092 Class Is Not Subclass Constraint

Umple semantic error raised when a class is not the subclass of a given class as defined by a constraint

Model constraints can be applied to Umple classes to ensure they respect certain properties, as defined in their constraints. This error is raised if a class is not the subclass of a given class as expected from the constraint.

Example

//The error occurs as A
//does not respect the constraint
//Alternative syntax is indicated
//in comments

class A {
  //[model: A child of B]
  //[model: A inherits from B]
  [model: A isA B]
}

class B {
}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

//A respects the constraint
//and avoids the error

class A {
  isA B;
  [model: A isA B]
}

class B {
}
      

Load the above code into UmpleOnline