File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
docs/docs/reference/other-new-features Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,25 @@ extended by both `AnyVal` and `AnyRef`. Since `Matchable` is a supertype of ever
63
63
- Type parameters and abstract types that are only bounded by some
64
64
universal trait: Again, ` Matchable ` should be added as a bound.
65
65
66
+ Here is the hierarchy of toplevel classes and traits with their defined methods:
67
+ ``` scala
68
+ abstract class Any :
69
+ def getClass
70
+ def isInstanceOf
71
+ def asInstanceOf
72
+ def ==
73
+ def !=
74
+ def ##
75
+ def equals
76
+ def hashCode
77
+ def toString
78
+
79
+ trait Matchable extends Any
80
+
81
+ class AnyVal extends Any , Matchable
82
+ class Object extends Any , Matchable
83
+ ```
84
+
66
85
` Matchable ` is currently a marker trait without any methods. Over time
67
86
we might migrate methods ` getClass ` and ` isInstanceOf ` to it, since these are closely related to pattern-matching.
68
87
You can’t perform that action at this time.
0 commit comments