Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[iOS build warnings] Prevent compiler inferring incorrect type #11807

Closed
wants to merge 1 commit into from

Conversation

robhogan
Copy link
Contributor

Fixes the build warning:

react-native/React/Modules/RCTRedBox.m:406:58: Conversion from value of type 'NSArray<RCTJSStackFrame *> *' to incompatible type 'NSArray<NSDictionary *> *

This appears because the compiler is left to infer the type of stack, and it does so as NSArray<RCTJSStackFrame *> based on RCTRedBox.m#L390. In reality stack may be either of two types and the function body deals with normalisation.

Mark the stack as explicitly NSArray<id> to prevent inference so we're free to make the decision to cast to more specific types.

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @javache and @frantic to be potential reviewers.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. GH Review: review-needed labels Jan 10, 2017
@ide
Copy link
Contributor

ide commented Jan 11, 2017

@facebook-github-bot shipit

@facebook-github-bot
Copy link
Contributor

@ide has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants