Skip to content

[4.2] [ConstraintSystem] Allow LValues for the bindings of an IUO @optional… #17169

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

Merged
merged 1 commit into from
Jun 13, 2018
Merged

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Jun 13, 2018

  • Explanation: Uses of IUO properties that are @optional Obj-C protocol requirements fail to type check. The fix here is trivial - we need to allow the type variables we create for these to be bound to LValue types.
  • Scope: This could break any client code importing Obj-C code that has @optional properties that are not null-annotated, or are annotated such that we import them as IUOs.
  • Issue #: rdar://problem/40868990
  • Risk: Very low.
  • Testing: Standard regression tests plus source compatibility tests.
  • Reviewer: @xedin

…requirement.

We were failing to bind the alternatives for an IUO @optional
requirement because we forgot to set the appropriate type variable option.

Fixes: rdar://problem/40868990
(cherry picked from commit 803fbee)
@rudkx rudkx changed the title [ConstraintSystem] Allow LValues for the bindings of an IUO @optional… [4.2] [ConstraintSystem] Allow LValues for the bindings of an IUO @optional… Jun 13, 2018
@rudkx
Copy link
Contributor Author

rudkx commented Jun 13, 2018

@swift-ci Please test

@rudkx
Copy link
Contributor Author

rudkx commented Jun 13, 2018

@swift-ci nominate

@rudkx rudkx merged commit d7ee6d2 into swiftlang:swift-4.2-branch-06-11-2018 Jun 13, 2018
@rudkx rudkx deleted the rdar40868990-4.2-06-11 branch June 13, 2018 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant