See the test: https://github.com/lampepfl/dotty/blob/1ba60fafcec2190d7e5e99b0775a26e4b0e54002/scala3doc-testcases/src/tests/shadowingDRI.scala#L3-L10 Declaration `findThisDeclaration` is present in the documentation only if `given R as A[B]` is commneted out.