Path types to associated types with form `T::A`

Closes #18433