Commit ed5bb66
[registrar] Import the framework for NSObject types used in method signatures. (#26418)
The static registrar could emit method signatures referencing an Objective-C
type whose framework header wasn't imported in the generated code, which made
the generated code fail to compile:
registrar.h:266:27: error: expected a type
266 | -(void) registerWebView:(WKWebView *)p0;
| ^
This happened for a wrapper type from a binding project (Google.MobileAds'
GADMobileAds) with a method taking a WebKit.WKWebView parameter, where nothing
else in the app pulled in the WebKit framework: 'CheckNamespace' is only called
for the types the registrar iterates over, not for the types showing up in the
generated method signatures.
Fix this by calling 'CheckNamespace' in 'ToObjCParameterType' for platform
NSObject types, so that the corresponding '#import <Framework/Framework.h>' is
always emitted.
Copilot-Session: ddb2f938-9d62-4ccf-8ce8-70056d74178b
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent e4325ae commit ed5bb66
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2479 | 2479 | | |
2480 | 2480 | | |
2481 | 2481 | | |
| 2482 | + | |
| 2483 | + | |
2482 | 2484 | | |
2483 | 2485 | | |
2484 | 2486 | | |
| |||
0 commit comments