Skip to content

[5.1 2019-06-12] [Type checker] Compute correct contextual substitutions for local generics #25424

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

Conversation

DougGregor
Copy link
Member

Improve compatibility of the newer property wrappers implementation with the first property-delegate-based implementation. Specifically:

  • Switch over to @propertyWrapper as the primary attribute name; add deprecated aliases for @_propertyWrapper and @propertyDelegate
  • Add support for using delegateValue when wrapperValue is not present

…teraction

When the backing storage of a wrapped property is default-initialized via the
property wrapper type's init(), don't count that as a direct initialization
of the backing storage for the purposes of constructing the memberwise
initializer. Instead, treat this case the same as if there were no initializer,
keying the form of the memberwise initializer off the presence of
init(initialValue:).

(cherry picked from commit 5244805)
(cherry picked from commit 57c69d9)
Fixes rdar://problem/51591955.

(cherry picked from commit 0cc9bce)
…perValue'.

Provide some backward compatibilty for property delegates written before
they became property wrapper, picking up 'delegateValue' (if present)
but warning about it.

(cherry picked from commit 3ac7540)
…erics.

When applying generic arguments to a local generic type within a generic
function, ensure that we correctly produce the contextual substitutions from
the generic function. Fixed with Pavel, who painstakingly tracked down
the bogus substitution.

Fixes SR-9954 / rdar://problem/48223824.

(cherry picked from commit b1503fe)
@DougGregor DougGregor merged commit 5db6280 into swiftlang:swift-5.1-branch-06-12-2019 Jun 13, 2019
@DougGregor DougGregor deleted the property-wrapper-attr-rename-5.1-06-12-2019 branch June 13, 2019 06:00
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