Type signature disambiguations do not take into account same-type generic constraints when substituting Self
#385
Labels
bug
Something isn't working
Self
#385
this is a hole that is originally caused by the Swift compiler bug swiftlang/swift#78343 , but is not sufficiently patched by Unidoc’s downstream heuristics.
specifically, given two extensions like these
the Swift compiler will fail to resolve the
Self
tokens, and Unidoc’s heuristic steps in, replacingSelf
withS<T>
. however, this substitution has no disambiguative value, as it is identical between both extensions.the client workaround is to avoid
Self
and spell these extensions using the actual resolved types:this would allow documentation to disambiguate between the two overloads with
in theory, Unidoc could inspect the generic constraints and substitute the type arguments itself. but at this point, we are layering heuristics upon heuristics in order to compensate for what is really a plain old Swift compiler bug.
The text was updated successfully, but these errors were encountered: