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 4e6a502 + 5212897 commit e54be6eCopy full SHA for e54be6e
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