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.
1 parent 88142e1 commit dc8ccbfCopy full SHA for dc8ccbf
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