Skip to content

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented May 21, 2021

InvalidAsyncContext depends on the decl context. That may case "sticky" not-recommended If it's cached for a non-async context.

To workaround this, stop checking InvalidAsyncContext when collecting completion items for caching. Also consistently use the SourceFile as the decl context to avoid decl context specific behavior.

rdar://78315441

'InvalidAsyncContext' depends on the decl context. That may case
"sticky" not-recommended If it's cached for a non-async context.

To workaround this, stop checking 'InvalidAsyncContext' when collecting
completion items for caching. Also consistently use the 'SourceFile' as
the decl context to avoid decl context specific behavior.

rdar://78315441
@@ -77,7 +77,7 @@ func test5() {
// STMT_1-LABEL: Results for filterText: ret [
// STMT_1-NEXT: return
// STMT_1-NEXT: retLocal
// STMT_1-NEXT: repeat
// STMT_1: repeat
Copy link
Member Author

Choose a reason for hiding this comment

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

This is because withTaskGroup(of:returning:body:) and withThrowingTaskGroup(of:returning:body:) are ranked above repeat. They used to be InvalidAsyncContext.

@rintaro
Copy link
Member Author

rintaro commented May 21, 2021

@swift-ci Please test

@rintaro rintaro requested a review from benlangmuir May 21, 2021 22:28
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 0ce1faa

@rintaro
Copy link
Member Author

rintaro commented May 22, 2021

@swift-ci Please test Linux

@rintaro rintaro merged commit 3cbc6e7 into swiftlang:main May 22, 2021
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.

3 participants