E005 Undefined Class in Association
[Previous]  [Next] 
|
User Manual [Previous]  [Next] E005 Undefined Class in AssociationUmple semantic error reported when an an association is specified to a class that cannot be foundThe classes at both ends of an association must exist in the system being compiled. It might be that the specified class is spelled wrongly or has been omitted from the compilation. If you are making an association to a class in existing code, then simply declare the class as external, as shown in the third example below. Example// This example generates the error message class X { 1 -- * Y; } Load the above code into UmpleOnline Solution to The Above So the Message No Longer Appears// The following shows how to avoid the error class X { 1 -- * Y; } class Y {} Load the above code into UmpleOnline Another Solution to The Above So the Message No Longer Appears// It is also possible to designate that // the class Y is external in the following manner class X { 1 -- * Y; } external Y {} Load the above code into UmpleOnline Another Example// The following will also generate the error message class X {} class Y {} association { 1 X -- * Z; } Load the above code into UmpleOnline |