Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[iOS] Fix compiler error with booleans inside objects #108

Merged
merged 5 commits into from
Dec 5, 2019

Conversation

colinking
Copy link
Contributor

@colinking colinking commented Dec 5, 2019

Fixes an issue where the iOS generator would generate clients that would fail to compile if they contained a non-nullable boolean inside of an object. At a high-level:

  • Nullable or optional booleans/integers generate as NSNumber * instead of BOOL * / NSInteger *. Required non-nullable booleans/integers are still BOOL/NSIntegers.
  • A missing space is now added between the type and name when generating objects, except for * types, which don't include that space (f.e. BOOL foo vs. NSNumber *foo)
  • Removes strong and nonnull modifiers from BOOL / NSInteger types.

For more details:

  • The changes to client generation are here: 6536f33
  • How that changes the generated output of the test suite is here: d1513c9

This PR also updates the test suite to test all optional, required and nullable types within an object.

RFPR of: #107

@colinking colinking marked this pull request as ready for review December 5, 2019 05:50
@colinking colinking merged commit e1aacd6 into master Dec 5, 2019
@colinking colinking deleted the colin/fix-ios-nonnull-bools-rfpr branch December 5, 2019 05:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant