Ok, without checking, what do you think happens? (List(0): Seq[Int]) match { case _: List[Int] => 1 case _ => 2 }
-
-
Replying to @propensive
why no "unreachable code" warning? It can't prove it statically?
1 reply 0 retweets 0 likes -
This Tweet is unavailable.
-
still forgetting that. Always. Perhaps part of the reason I was a bad java dev.
1 reply 0 retweets 0 likes -
Replying to @fanf42 @propensive
actually, I'm still astonished it can't prove that List(0) is not null.
1 reply 0 retweets 0 likes
Replying to @fanf42
The compiler has had its mind completely wiped of any details of the scrutinee that aren't expressed by its type, `Seq[Int]`.
1:37 PM - 20 Jul 2020
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.