You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case of 2 base classes that inherit from each other, it is normal to have 2 aspects that inherit from each other that each point to its base class.
The annotation OverrideAspectMethod is used to both generate the super_ method method but also remind to the user that it overrides another method.
There is some code for checking that this annotation is correctly put, but it doesn't seem to work.
the following code does not report error (or at least a warning) about it
classParent {
publicString name
new(String name){
this.name = name
}
}
classChildAextendsParent{
new(String name){
super(name)
}
}
@Aspect(className=typeof(Parent))
classParentAspect {
publicdefStringmyOperation() {
"myOperation ParentAspect("+_self.name+")"
}
publicdefStringmyOperation2() {
"myOperation2 ParentAspect("+_self.name+")"
}
}
@Aspect(className=typeof(ChildA))
classChildAAspectextendsParentAspect{
publicdefStringmyOperation() { // An error should be reported here !!!// due to missing annotatio call to super is not possible"myOperation ChildAAspect("+_self.name+")"
}
@OverrideAspectMethod
publicdefStringmyOperation2() {
"myOperation2 ParentAspect("+_self.name+")["+ _self.super_myOperation2 +"]"
}
}
Note: this must not be confused with the override modifier used when an aspect on a base class is refined by another aspect on the same base class as below:
In case of 2 base classes that inherit from each other, it is normal to have 2 aspects that inherit from each other that each point to its base class.
The annotation OverrideAspectMethod is used to both generate the super_ method method but also remind to the user that it overrides another method.
There is some code for checking that this annotation is correctly put, but it doesn't seem to work.
the following code does not report error (or at least a warning) about it
Note: this must not be confused with the override modifier used when an aspect on a base class is refined by another aspect on the same base class as below:
The text was updated successfully, but these errors were encountered: