So, most people were wrong about this, and it also split opinion rather evenly... I suspect even that some of the people who were right were right for the wrong reasons! But the Scala compiler is actually being safe and correct, here. Explanation below...https://twitter.com/propensive/status/1284952925727580165 …
-
Show this thread
-
Replying to @propensive
tl;dr Poll answer "Compiles, no warning → 1" is correct. Right?
1 reply 0 retweets 1 like -
This Tweet is unavailable.
-
Replying to @jeremyrsmith @jimofl
No, sealedness isn't required to solve it. Any as-yet-unknown subtype can still be checked at runtime as a `List[_]` and the `Int` is still known statically.
1 reply 0 retweets 1 like -
This Tweet is unavailable.
Replying to @jeremyrsmith @jimofl
That part comes from the runtime check, so it's only for that particular case...
2:07 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.