Skip to content

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

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 4, 2022

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]

@ahoppen ahoppen requested a review from xedin April 4, 2022 08:39
@ahoppen
Copy link
Member Author

ahoppen commented Apr 4, 2022

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Apr 4, 2022

@swift-ci Please SourceKit stress test

…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]
@ahoppen ahoppen force-pushed the pr/complete-top-level-func-with-error-param branch from 541e7a6 to ed58b68 Compare April 6, 2022 08:12
@ahoppen
Copy link
Member Author

ahoppen commented Apr 6, 2022

@swift-ci Please smoke test

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