I'm not entirely sure why this is necessary. Something I read suggested that potentially the [self alloc] is returning a generic type, so the compiler searches all known types for candidate methods. The advice for that situation was to add an explicit cast, but doing so gave syntax errors, despite everything matching the most similar examples I could find.
Instead, I just did manual name mangling by adding a 2 to the method name.
Hopefully, we've still got employees who have some vague familiarity with Objective-C/Objective-C++ and one of them can fix this properly before we're forced to put this into production code. It can live as a draft PR until then.
There's a merge conflict with something that already fixes this, so it looks like someone pushed an API change without updating the submodules in the parent repo.
I'm not entirely sure why this is necessary. Something I read suggested that potentially the
[self alloc]
is returning a generic type, so the compiler searches all known types for candidate methods. The advice for that situation was to add an explicit cast, but doing so gave syntax errors, despite everything matching the most similar examples I could find.Instead, I just did manual name mangling by adding a
2
to the method name.Hopefully, we've still got employees who have some vague familiarity with Objective-C/Objective-C++ and one of them can fix this properly before we're forced to put this into production code. It can live as a draft PR until then.