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
g[W](q0[W](q0[W](W.w))).as when all q0, p1, and p2 instances are present
g[Nothing](p1[Nothing]).as when only q0, and p1 instances are present
No given instance error, when only q0 is given
p1 is selected over q0 when they are the only two available alternatives, suggesting it is a "better" candidate.
Yet when we introduce an ambiguity by adding p2, we recover from it with q0, a "worse" candidate, which IIRC should not happen.
Even more bafflingly, removing the p0 and p1 alternatives seems to affect the constraining of the type variable F, preventing resolution from finding any instance at all.
It is also very strange that the q0 definition is somehow relevant, since it derives Q[F] using Q[F] itself.
Compiler version
Scala compiler version 3.7.1-RC1-bin-SNAPSHOT-nonbootstrapped-git-24b2dc7
Minimized code
Test elaborates to:
g[W](q0[W](q0[W](W.w))).as
when all q0, p1, and p2 instances are presentg[Nothing](p1[Nothing]).as
when only q0, and p1 instances are presentp1
is selected overq0
when they are the only two available alternatives, suggesting it is a "better" candidate.Yet when we introduce an ambiguity by adding
p2
, we recover from it withq0
, a "worse" candidate, which IIRC should not happen.Even more bafflingly, removing the
p0
andp1
alternatives seems to affect the constraining of the type variableF
, preventing resolution from finding any instance at all.It is also very strange that the
q0
definition is somehow relevant, since it derivesQ[F]
usingQ[F]
itself.Minimised from the #23020 (comment)_ by @Alex1005a.
The behavior is the same before and after the changes from #23020.
The text was updated successfully, but these errors were encountered: