-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[test] Use %refactor-check-compiles in more places #38915
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
[test] Use %refactor-check-compiles in more places #38915
Conversation
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.
Thanks for doing all those!
// ERROR-BLOCK-COMMENT-NEXT: // h | ||
// ERROR-BLOCK-COMMENT-NEXT: print("after") | ||
// ERROR-BLOCK-COMMENT-NEXT: // i | ||
// ERROR-BLOCK-COMMENT-NEXT: {{ }} |
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.
Why is there a newline here?
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.
It's because we include the trailing trivia up until the next token, but in this case the next token gets removed by the transform, leaving a stray newline. At the time, it didn't seem like a case that would come up too often, given it should only happen for trailing comments at the end of braces. Though looking at it again, it seems like it should be pretty straightforward to fix, filed rdar://82072147 to take care of it. Thanks for pointing it out!
This hidden frontend option lets us be more lax when type-checking in the presence of editor placeholders by treating them as holes during constraint solving.
This allows us to test more cases that type-check modulo placeholders.
Forward these flags to both swift-frontend and swift-refactor.
Update a bunch of async refactoring tests to use %refactor-check-compiles in more cases.
c39889e
to
f58c62c
Compare
@swift-ci please smoke test |
Add a hidden frontend flag
-warn-on-editor-placeholder
that allows%refactor-check-compiles
to be more lenient with placeholders, and update a bunch of async refactoring tests to use%refactor-check-compiles
in more cases.Note the diff is best viewed without whitespace.
rdar://81830915