Files
wren/doc/site/core/class.markdown
T

27 lines
493 B
Markdown
Raw Normal View History

2015-01-18 15:36:36 -08:00
^title Class Class
^category core
### **name**
The name of the class.
2015-03-14 09:48:45 -07:00
### **supertype**
The superclass of this class.
:::dart
class Crustacean {}
class Crab is Crustacean {}
IO.print(Crab.supertype) // "Crustacean"
A class with no explicit superclass implicitly inherits Object:
:::dart
IO.print(Crustacean.supertype) // "Object"
Object forms the root of the class hierarchy and has no supertype:
:::dart
IO.print(Object.supertype) // "null"