Codetools should support Objective C related result types
Original Reporter info from Mantis: zpeterson @boramis
-
Reporter name: Zoë Peterson
Original Reporter info from Mantis: zpeterson @boramis
- Reporter name: Zoë Peterson
Description:
Currently the code tools in {$modeswitch objectivec1} can't autocomplete after creating an NSObject descendant with .alloc since it just sees the "id" return type and doesn't know what to do with it.
When fixing bug 35994, Jonas found that Objective C has a concept called "related result types" that actually maps the return type for id/identifier type, as returned by "alloc", "init*", and "autoRelease" to their correct concrete classes: http://clang.llvm.org/docs/LanguageExtensions.html#objective-c-features
He added support for them to FPC in revs 42815 and 42816. It would be nice if Lazarus could handle the same cases.
Mantis conversion info:
- Mantis ID: 36025
- Assignee Gitlab user: @PascalRiekenberg
- Assignee Mantis username: PascalR
- Assignee name: Pascal Riekenberg
- Version: 2.0.4