uOttawaUniversity of Ottawa - Canadas University
list of dots

Umple User Manual    [Previous]   [Next]   

Loading

E037 Uninitialized Constant Object

Umple semantic error generated when an Object constant is not initialized

It makes little sense to have a constant unless it is given a value. Since there is no obvious default value for arbitrary data types, unitialized constants that are not from a default Umple data type the code cannot be parsed until the constants are initialized.

Example

// This example generates error 37
class X {
  const Y A;
}

class Y {
  Integer a;
}

      

Load the above code into UmpleOnline

 

Another Example

// This example resolves error 37

class X {
  const Y A=new Y(3);
}

class Y {
  Integer a;
}

      

Load the above code into UmpleOnline