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
{{ message }}
Repository navigation
Commit 4eceb58
Browse filesBrowse the repository at this point in the historyBrowse files
Resolve an inferred template argument to its bound when a lower bound refers back to a site still being resolved
- TemplateArgumentSolver: count when substituting a marker reaches a site that
is still being resolved (a cycle), and when that happens while substituting a
lower bound, resolve the site to the template's bound. `T :> Foo<T>` has no
finite solution other than the bound; previously the cycle was broken with the
delegate, inferring e.g. `WeakAnalysingMap<WeakAnalysingMap<object>>` for
`$map = new WeakAnalysingMap(); $map->set($map);` and then reporting the call.
- The counter is restored after each site's resolution, so a cycle settled
inside another site (indirect cycle `$a->set($b); $b->set($a);`) does not
widen the outer site too.
- Also covers the analogous shapes: indirect cycles across two objects, the
object wrapped in a list/array argument, a cycle after another lower bound,
a constructor-inferred initial type, and contravariant templates.
- TemplateArgumentSolver is not shadowed by turbo (only instantiated from C++),
so no native mirror change is needed.
0 commit comments