diff options
Diffstat (limited to '14-the-scala-standard-library.md')
-rw-r--r-- | 14-the-scala-standard-library.md | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/14-the-scala-standard-library.md b/14-the-scala-standard-library.md index 068f886e19..5b408cff61 100644 --- a/14-the-scala-standard-library.md +++ b/14-the-scala-standard-library.md @@ -94,11 +94,9 @@ $x$ match { ``` where the type $T'$ is the same as $T$ except if $T$ is -of the form $D$ or $D[\mathit{tps}]$ where $D$ is a type member of some outer -class $C$. In this case $T'$ is `$C$#$D$` (or -`$C$#$D[tps]$`, respectively), whereas $T$ itself would -expand to `$C$.this.$D[tps]$`. In other words, an -`isInstanceOf` test does not check for the +of the form $D$ or $D[\mathit{tps}]$ where $D$ is a type member of some outer class $C$. +In this case $T'$ is `$C$#$D$` (or `$C$#$D[tps]$`, respectively), whereas $T$ itself would expand to `$C$.this.$D[tps]$`. +In other words, an `isInstanceOf` test does not check that types have the same enclosing instance. The test `$x$.asInstanceOf[$T$]` is treated specially if $T$ is a |