-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Remove feature guard on lifetime dependence inference #76588
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
Remove feature guard on lifetime dependence inference #76588
Conversation
@swift-ci test |
@swift-ci test macOS platform |
8c24e34
to
18c5322
Compare
@swift-ci smoke test macOS platform |
18c5322
to
f02448b
Compare
@swift-ci smoke test macOS platform |
@swift-ci test |
55ba1bd
to
077ec17
Compare
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have a few comments on the changes to C++ interop.
077ec17
to
32ca01d
Compare
cb0de0f
to
f07ab0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The C++ interop changes LGTM now, thanks!
I haven't reviewed the rest of the PR.
@swift-ci test |
f07ab0b
to
47b7d6e
Compare
@swift-ci test |
3555333
to
f25e383
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@swift-ci test |
1 similar comment
@swift-ci test |
f25e383
to
a9d317e
Compare
@swift-ci test |
a9d317e
to
b28d8c9
Compare
@swift-ci test |
b28d8c9
to
055b153
Compare
@swift-ci test |
SwiftDeclSynthesizer::makeDefaultArgument does not create substituion map while creating the implicit FuncDecl which leads to TypeChecker complaining about the absence when there are type parameters. Avoid importing such C++ functions for now.
This PR introduces a `mapTypeIntoContext` in `InterfaceTypeRequest::evaluate` which introduces a cycle in this test.
We currently load it for prespecialization when it wasn't loaded initially. This causes an inadvertant issue for invertible protocols. When we don’t have the stdlib loaded initially, we “synthesize” the invertible protocol from the Builtin module by creating a new `ProtocolDecl*` and stashing it on the `ASTContext`. If the stdlib gets loaded later, deserialized stdlib types conform to the deserialized `Escapable` protocol which has a different `ProtocolDecl *` pointer for `Escapable`. So queries like `conformsToInvertible` fail because they are using the wrong `ProtocolDecl*` for `Copyable`/`Escapable` while looking up the ConformanceTable.
055b153
to
cf4832e
Compare
@swift-ci test |
Lifetime dependence inference runs on all function results that are ~Escapable. It was guarded by the NonEscapable feature flag. This PR removes the feature guard. This should theoretically be an NFC because ~Escapable types are flagged by Sema without the feature flag.