Invalid method override

When overriding a method in a derived class, its declaration should match the method declaration from the ancestor class, including return type, argument names, and argument types. However, because Ultra Fractal supports return type covariance, the return type may be a descendant of the base method's return type.

Example:

class Base {
  func test(int a, float b)
  endfunc
}

class Derived(Base) {
  func test(float a, float b)  ; Error!
  endfunc
}

It is possible that you want to introduce a new method in the descendant instead of overriding a derived method. In this case, you need to rename the method in the descendant so its name is unique.

See Also
Errors