You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enumTag[A]:caseMyTupleextendsTag[(String, String)]
defprintIt[A](t: Tag[A], a: A):Unit=
t matchcaseTag.MyTuple=> println(a._1)
Output
value _1 is not a member of A
where: A is a type in method printIt with bounds >: (String, String) and <: (String, String)
Expectation
Should compile fine, since the compiler knows that it is <: (String, String) and (String, String) should have _1. FWIW, annotating the type works. I.e.