Permalink
Browse files

SI-4980 isInstanceOf does not do outer checks

  • Loading branch information...
1 parent f0b37c2 commit 4615ec5446643ad8dc3549c1e9c6deb102d2ff7a @adriaanm adriaanm committed Mar 12, 2014
Showing with 3 additions and 5 deletions.
  1. +3 −5 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

0 comments on commit 4615ec5

Please sign in to comment.