Is a nullable#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf95b42c15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| final params = originalMethod.params; | ||
| return '${params[0].internalName ?? params[0].name}.wrappedInstance ' | ||
| '${originalMethod.name} ' | ||
| '${params[1].internalName ?? params[1].name}.wrappedInstance'; |
There was a problem hiding this comment.
Support unary operators when generating wrapper calls
The operator call path unconditionally reads params[1], but Swift prefix/postfix operators have a single parameter; when such an operator is encountered, wrapper generation will throw at runtime (index out of range) and fail the binding generation flow for that module.
Useful? React with 👍 / 👎.
| return '${params[0].internalName ?? params[0].name}.wrappedInstance ' | ||
| '${originalMethod.name} ' | ||
| '${params[1].internalName ?? params[1].name}.wrappedInstance'; |
There was a problem hiding this comment.
Unwrap operator operands based on transformed param types
The generated operator expression always uses .wrappedInstance on both operands, which is only valid when both parameters are wrapper classes; operators that mix wrapped and ObjC-representable types (for example Vec2 with Double) will produce invalid Swift like rhs.wrappedInstance on a primitive and fail compilation.
Useful? React with 👍 / 👎.
| 'package:pirate_speak/pirate_speak.dart', | ||
| [ | ||
| Name('PirateTranslator'), | ||
| Name(''), |
There was a problem hiding this comment.
Use the actual method name in the record_use API example
The methodId definition uses an empty name component (Name('')), so constArgumentsFor(methodId) cannot match calls to PirateTranslator.speak and the sample will always appear to return no recorded arguments, which makes the published example incorrect for users.
Useful? React with 👍 / 👎.
No description provided.