Skip to content

[5.7][CodeCompletion] Allow references to top-level functions with error parameters #42240

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

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 7, 2022

Cherry-pick of #42160 to release/5.7.


During normal type-checking we ignore functions that contain an error. During code completion, we want to consider them and replace all error types by placeholders so we can match up the known types.

We already do this for member types (see getTypeOfMemberReference). We should also do it for top-level functions.

Fixes rdar://81425383 [SR-14992]

…arameters

During normal type-checking we ignore functions that contain an error. During code completion, we want to consider them and replace all error types by placeholders so we can match up the known types.

We already do this for member types (see `getTypeOfMemberReference`). We should also do it for top-level functions.

Fixes rdar://81425383 [SR-14992]

# Conflicts:
#	test/IDE/complete_call_arg.swift
@ahoppen ahoppen added the r5.7 label Apr 7, 2022
@ahoppen ahoppen requested a review from xedin April 7, 2022 07:00
@ahoppen ahoppen requested a review from a team as a code owner April 7, 2022 07:00
@ahoppen
Copy link
Member Author

ahoppen commented Apr 7, 2022

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Apr 7, 2022

@swift-ci Please test

@ahoppen ahoppen merged commit 9584883 into swiftlang:release/5.7 Apr 8, 2022
@ahoppen ahoppen deleted the pr-5.7/complete-top-level-func-with-error-param branch April 8, 2022 08:59
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7 labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants