Skip to content

[Sema] Synthesize pre-type-checked ASTs for more derived conformances #26946

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 4 commits into from
Aug 30, 2019

Conversation

DougGregor
Copy link
Member

Synthesize pre-type-checked ASTs for a few places where we are deriving conformances:

  • The getter for hashValue
  • == for uninhabited enums
  • == for enums whose cases have no associated values

Should fix rdar://problem/54712316, a case where the non-type-checked
AST was getting processed by SILGen.

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor DougGregor requested a review from slavapestov August 30, 2019 00:31
Otherwise, the standard library won't build ;)
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

1 similar comment
@DougGregor
Copy link
Member Author

@swift-ci please test source compatibility

@DougGregor DougGregor merged commit dccca2f into swiftlang:master Aug 30, 2019
@DougGregor DougGregor deleted the synthesize-pre-type-checked branch August 30, 2019 22:29
if (!hashFunc->hasInterfaceType())
static_cast<TypeChecker *>(C.getLazyResolver())->validateDecl(hashFunc);

auto substitutions = SubstitutionMap::get(
Copy link
Contributor

Choose a reason for hiding this comment

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

This should get SubstitutionMap::getProtocolSubstitutions()

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, thank you!

Copy link
Member Author

Choose a reason for hiding this comment

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

No, never mind: it's not a protocol method, it's a free function.

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