Skip to content

[Property wrappers] Reject opaque result types when there is no initializer #32251

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

Fixes rdar://problem/63169705 / FB7699647.

…alizer.

Fixes rdar://problem/63169705 / FB7699647.
@DougGregor DougGregor requested a review from hborla June 8, 2020 21:50
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@hborla
Copy link
Member

hborla commented Jun 8, 2020

Does this only affect default initialization of property wrappers? It seems like this would also cause the crash when generating the memberwise initializer for X:

@propertyWrapper
struct SomeWrapper<T> {
  var wrappedValue: T

  init(wrappedValue: T) { self.wrappedValue = wrappedValue }
}

protocol P { }

struct X {
  @SomeWrapper var property: some P
}

@DougGregor
Copy link
Member Author

Does this only affect default initialization of property wrappers?

You're absolutely right! Fixed in the second commit, and added your example. Thank you!

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

Copy link
Member

@hborla hborla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@DougGregor DougGregor merged commit 886ae19 into swiftlang:master Jun 9, 2020
@DougGregor DougGregor deleted the property-wrapper-opaque-result-crash-fix branch June 9, 2020 04:13
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.

2 participants