Note: information on this page refers to Ceylon 1.2, not to the current release.
extends
operator
The non-associating, binary prefix extends
operator is used to test whether its
left-hand operand is extends its right-hand operand
Usage
void m(Type<Anything> x) {
Boolean extension = x extends Class<Anything>;
}
Description
Definition
The extends
operator is defined as follows:
lhs.extendsType(rhs);
See the language specification for more details.
Polymorphism
The extends
operator is polymorphic.
The meaning of extends
depends on the
Class
class and
Type
interface.
Type
The result type of the entends
operator is Boolean
.
See also
- API documentation for [
Class
] doc coming soon at (https://modules.ceylon-lang.org/repo/1/ceylon/language/1.2.2/module-doc/metamodel/Class.type.html) - API documentation for
Type
extends
in the language specification- operator precedence in the language specification
- Operator polymorphism in the Tour of Ceylon