list of dots

User Manual    [Previous]   [Next]   

E038 Autogenerated Attribute Name Conflict

Umple semantic error issued when a name conflict occurs between an attribute and an automatically generated variable in the same class

Some attribute generate two variables, one representing the attribute itself, and one representing associated information. In particular an autounique attribute will generate a static variable prefixed with 'next' and an immutable attribute will generate a variable prefixed with 'canSet'. This error message occurs when conflicts with these occurs.

Example

//The error is generated because of
//the name conflict between attr
//and the attribute canSetAttr,
//which is automatically generated
//for an immutable attribute

//The same occurs for the attr2
//and nextAttr2
class A {
  immutable attr;
  canSetAttr;
  
  autounique attr2;
  nextAttr2;
}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

//The error can be fixed by
//modifying the names of the
//attributes
class A {
  immutable attr;
  otherAttr;
  
  autounique attr2;
  otherAttr2;
}
      

Load the above code into UmpleOnline