Skip to content

[NFC] VarDecls in Pattern Binding Initializers Have No Overload Type #27725

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
Oct 16, 2019

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Oct 16, 2019

Extend #27668 by declining to validate the type of variables
bound by a pattern binding initializer when computing an effective
overload type while rooted at that initializer.

Extend swiftlang#27668 by declining to validate the type of variables
bound by a pattern binding initializer when computing an effective
overload type while rooted at that initializer.
@CodaFi CodaFi requested a review from xedin October 16, 2019 17:28
@CodaFi
Copy link
Contributor Author

CodaFi commented Oct 16, 2019

@swift-ci please smoke test

@CodaFi
Copy link
Contributor Author

CodaFi commented Oct 16, 2019

⛵️

@CodaFi CodaFi merged commit b202766 into swiftlang:master Oct 16, 2019
@CodaFi CodaFi deleted the crop-circles branch October 16, 2019 19:05
CodaFi added a commit to CodaFi/swift that referenced this pull request Oct 21, 2019
Resolve a cycle caused by overload resolution considering recursive
static candidates where before it would silently reject them.  In
a world before the InterfaceTypeRequest, the overload resolution
machinery would attempt to validate the declaration and would recieve
a bad answer.  This caused circular candidates to be ignored as a side
effect.  This behavior was partially restored by the fixes in swiftlang#27725 and swiftlang#27668
but that isn't enough for recursive static variables.  Even if it were,
the constraint fix kind doesn't make sense.

Luckily, the right answer is to just reject recursive static VarDecl
candidates entirely.

Addresses rdar://56410015
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