Note: information on this page refers to Ceylon 1.1, not to the current release.
actual annotation
The actual annotation marks a member as refining an inherited member.
Usage
class Example() {
shared actual String string = "example";
}
Description
Methods, attributes, and member classes may be annotated actual, and only
when the member that they are refining was annotated default for formal.
Because a member that is refinable must be visible outside the scope of the
type it's defined in, an actual member is necessarily shared.
actual is the Ceylon equivalent of Java's @Override annotation, but unlike
@Override it must be used when refining a member.
See also
- API documentation for
actual - Reference for annotations in general