Files
swift-mirror/test/Interop/Cxx/class/method/ambiguous-methods-module-interface.swift
Egor Zhdan 168ef490af [cxx-interop] Disambiguate const and non-const methods consistently
When importing a C++ struct that contains two methods that only differ in const-ness, we append `Mutating` to the name of the non-const method to make it possible to call from Swift unambiguously.

Unfortunately that logic was dependent on the order in which we import methods of a class: the `Mutating` suffix was added when another method with the same name was already imported.

This caused lookup failures, and the behavior was incorrect when the pair of methods return instances of an unsafe type: the const overload was renamed as `Unsafe` properly, but the non-const overload was not renamed.
2022-12-19 15:03:04 +00:00

999 B