Skip to content

Instantly share code, notes, and snippets.

@bbarker
Last active December 12, 2021 04:28
Show Gist options
  • Save bbarker/d332c5f02f00473f6d0e252c6d651757 to your computer and use it in GitHub Desktop.
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
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