- 
                Notifications
    
You must be signed in to change notification settings  - Fork 10.6k
 
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfperformancetype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
| Previous ID | SR-10785 | 
| Radar | None | 
| Original Reporter | forucial (JIRA User) | 
| Type | Bug | 
Environment
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.
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfperformancetype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis