Skip to content

Conversation

@hborla
Copy link
Member

@hborla hborla commented May 22, 2020

Cherry-pick of #31949

Reviewer: @DougGregor


  • In ParamDecl::getDefaultValueStringRepresentation , only attempt to extract the text for an initial wrapped value if the property has a wrapped value placeholder in the initializer call. Otherwise, the compiler will crash when serializing the memberwise initializer.
  • For properties that are implicitly default initialized via property wrapper (without () on the property wrapper attribute), mark the init call as implicit. There are assertions elsewhere (e.g. in SemaAnnotator::handleCustomAttributes) that expect an explicit argument on the custom attribute if the initializer is not implicit.

Resolves: rdar://problem/59471019

hborla added 2 commits May 21, 2020 16:50
to return a string representing default initialization when a
property is default initialized via property wrapper.
…lized

via property wrapper, mark the init call as implicit.
@hborla hborla requested a review from a team as a code owner May 22, 2020 00:22
@hborla
Copy link
Member Author

hborla commented May 22, 2020

@swift-ci please test

@hborla hborla added the r5.3 label May 22, 2020
@hborla hborla merged commit 9e77c9a into swiftlang:release/5.3 May 22, 2020
@hborla hborla deleted the 5.3-property-wrapper-default-init branch May 22, 2020 03:15
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍒 release cherry pick Flag: Release branch cherry picks swift 5.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants