Skip to content

Commit a110739

Browse files
Update docs/blog/_posts/2020-12-18-scala3-m3.md
Co-authored-by: Sébastien Doeraene <[email protected]>
1 parent e7d421c commit a110739

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/blog/_posts/2020-12-18-scala3-m3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class Object extends Any, Matchable
112112

113113
`Matchable` is currently a marker trait without any methods. Over time, we intend to migrate the methods `getClass` and `isInstanceOf` to it, since these are closely related to pattern-matching.
114114

115-
With the addition of this type, we now make the compiler emit warnings when trying to do a trick like the one discussed above:
115+
In the meantime, the compiler will emit warnings when trying to call those methods, or when performing a `match`, on an value that is not a `Matchable`. For example, the above example is now flagged:
116116

117117
```scala
118118
-- Warning: i7314.scala:6:12 ---------------------------------------------------

0 commit comments

Comments
 (0)