Skip to content
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-10785] A single line code makes compiler fail #53175

swift-ci opened this issue May 29, 2019 · 2 comments

[SR-10785] A single line code makes compiler fail #53175

swift-ci opened this issue May 29, 2019 · 2 comments


Copy link

@swift-ci swift-ci commented May 29, 2019

Previous ID SR-10785
Radar None
Original Reporter forucial (JIRA User)
Type Bug

OS: macOS 10.14.5

Xcode: 10.2.1

Swift: 5.0.1

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Performance, TypeChecker
Assignee None
Priority Medium

md5: 450b9b21145f78dc00ed0ceaf915f4c7

Issue Description:

if 0.1 * 5 == 0.1 + 0.1 + 0.1 + 0.1 + 0.1 { }

This code makes compiler refused to compile and report

"The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions"

However such code

if 0.1 * 4 == 0.1 + 0.1 + 0.1 + 0.1 { }

is accepted without any error.

Copy link

@belkadan belkadan commented May 29, 2019

cc @xedin (probably not worth tracking separately from the others)

Copy link

@gregomni gregomni commented Aug 3, 2019

I can't reproduce this one with either the Xcode 11.0 b5 compiler, or the current nightly toolchain.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants