1 Commits

Author SHA1 Message Date
Colby Mchenry 6df4827625 fix(cpp): a call through a class reaches that class's own or inherited method, never a nested or namesake class's (#2548)
The class-name and capitalized-receiver strategies took any method of the
call's name whose qualified name contained the class's name, so protobuf's
`descriptor->file()` reached `Descriptor::ExtensionRange::file` and rocksdb's
`CompositeEnv::IsInstanceOf(name)` reached `CompositeEnvWrapper::IsInstanceOf`,
while an explicit base call like `PessimisticTransaction::PopSavePoint()`
never found the method the class inherits. In C and C++ a method is now the
class's only when its qualified name is the class's plus the method's, and a
call written through a class asks C++ lookup, bases included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 06:30:36 +00:00