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
With the default -Xmin-implicit-search-depth of 5 the implicitly compiles as,
/* inlined from dotty.DottyPredef$ */
{
valev:Test4.Foo[Int, Int] =Test.Foo.diverge[Int](
Test.Foo.diverge[Int](
Test.Foo.diverge[Int](
Test.Foo.diverge[Int](
Test.Foo.diverge[Int](Test4.Foo.foo[Int, Int])
)
)
)
)
ev
}
With -Xmin-implicit-search-depth set to 2 it compiles as,
/* inlined from dotty.DottyPredef$ */
{
valev:Test4.Foo[Int, Int] =Test.Foo.diverge[Int](
Test.Foo.diverge[Int](Test4.Foo.foo[Int, Int])
)
ev
}
ie. each increment in the value adds an additional call of the diverging implicit before we fail back to the convergent one. We get the expected result only if the parameter is set to 0.
Clearly the entire divergent path should be discarded. It remains to be seen if it's possible to reliably unwind a divergent path or if it would be better to abort the entire search and retry with unconditional divergence checking.
The text was updated successfully, but these errors were encountered:
This will go away once the SIP'd divergence rules are implemented, but leaving this for posterity ...
Given,
With the default
-Xmin-implicit-search-depth
of 5 theimplicitly
compiles as,With
-Xmin-implicit-search-depth
set to 2 it compiles as,ie. each increment in the value adds an additional call of the diverging implicit before we fail back to the convergent one. We get the expected result only if the parameter is set to 0.
Clearly the entire divergent path should be discarded. It remains to be seen if it's possible to reliably unwind a divergent path or if it would be better to abort the entire search and retry with unconditional divergence checking.
The text was updated successfully, but these errors were encountered: