uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

E029 Constraint Type Mismatch

Umple semantic error reported when there is a type mismatch in a constraint

It is only possible to compare a String to a String, a Boolean to a Boolean, and a number to a number, etc. Violations result in a type mismatch error.

Example

// This example generates the message
class X29attrtypeconstr {
  a;
  [a > 5]
}

      

Load the above code into UmpleOnline

 

Another Example

// The following shows how to avoid the message
class X29attrtypeconstr {
  Integer a;
  [a > 5]
}


      

Load the above code into UmpleOnline