Last active
December 12, 2021 04:28
-
-
Save bbarker/d332c5f02f00473f6d0e252c6d651757 to your computer and use it in GitHub Desktop.
If we explicitly type the list values, then we can create our list of `Any`s
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 in1any: Inner[Any] = Inner("foo") | |
val in2any: Inner[Any] = Inner(3) | |
val outsFromInsAny2: List[Outer[Any]] = List(in1any, in2any).map(Outer.apply) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment