We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fe088bb + dc8ccbf commit 01ca4aeCopy full SHA for 01ca4ae
docs/_spec/12-the-scala-standard-library.md
@@ -68,11 +68,7 @@ abstract class Any {
68
def isInstanceOf[a]: Boolean
69
70
/** Type cast; needs to be inlined to work as given */ */
71
- def asInstanceOf[A]: A = this match {
72
- case x: A => x
73
- case _ => if (this eq null) this
74
- else throw new ClassCastException()
75
- }
+ def asInstanceOf[A]: A
76
}
77
78
/** The root class of all value types */
0 commit comments