|
E012 Class Indirectly Subclass of Self
[Previous]  [Next] 
|
![]() |
User Manual [Previous]  [Next] E012 Class Indirectly Subclass of SelfUmple semantic error reported when a class is designated as a subclass of itself, through some other class.The inheritance hierarchy cannot have cycles. It must be a strict tree. It is therefore not allowed to make a cycle or loop, in which a class is indirectly a subclass of itself. Example
// This example generates the error message
class A {
isA C;
}
class B {
isA A;
}
class C {
isA B;
}
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 A {
}
class B {
isA A;
}
class C {
isA B;
}
Load the above code into UmpleOnline |