Last active
December 12, 2021 04:29
-
-
Save bbarker/360780ebf24c4648c729a2238bc491ba to your computer and use it in GitHub Desktop.
If we explicitly ascribe more precise types for each value, then we run into the same kind of error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val someStuffAny2: List[SomeClass[Any]] = | |
List(SomeClass("foo"): SomeClass[String], SomeClass(1): SomeClass[Int]) | |
// ❌ Found: Playground.SomeClass[Int] | |
// Required: Playground.SomeClass[Any] | |
// ❌ Found: Playground.SomeClass[String] | |
// Required: Playground.SomeClass[Any] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment