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
[SR-10601] Very slow type check of simple expression #53001
Comments
cc @xedin |
Actually, this no longer produces that diagnostic on Swift 5 (Xcode 10.2.1). |
You'd probably get faster type-checking if you left out the conversions to UInt32. You may actually be getting different behavior from what you expect there, because |
Comment by Anders Kierulf (JIRA) This was indeed with Xcode 10.2.1, Swift 5, so surprised you're not seeing it. I added the extra UInt32 in a previous version to speed up type checks, helped at that point. The behavior should be the same as long as there's guaranteed to be no overflow, right? The following is even slower to type check:
But the following is fast:
|
Yeah, that is indeed strange: https://imgur.com/a/k5HrRiq. I copy-pasted the code into Playgrounds as well, but no error. |
Comment by Anders Kierulf (JIRA) Do you set -Xfrontend -warn-long-expression-type-checking=100 in Other Swift Flags? I'm not seeing an error, just the slow type-check warning. |
Yes, I'd expect the result to be the same in this case, with all the types being |
Attachment: Download
Additional Detail from JIRA
md5: b1b1c9d94f36a6da0d8d01bdd475d461
Issue Description:
Xcode project attached.
The text was updated successfully, but these errors were encountered: