Cast Option[Any] to int

Viewed 38088

How do I cast this to an Int and not Some(Int)

val a: Option[Any] = Some(1)

I tried toInt and it gave an error value toInt is not a member of Option[Any]

3 Answers
Related