- 
                Notifications
    
You must be signed in to change notification settings  - Fork 10.6k
 
Open
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 itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationtype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
| Previous ID | SR-6928 | 
| Radar | rdar://problem/37290901 | 
| Original Reporter | jlongster (JIRA User) | 
| Type | Bug | 
Environment
NA
Additional Detail from JIRA
| Votes | 0 | 
| Component/s | Compiler | 
| Labels | Bug, DiagnosticsQoI, TypeChecker | 
| Assignee | None | 
| Priority | Medium | 
md5: 78ea10ca49c4c971a8f1e189eeacd02a
Issue Description:
Here is a simple repro: https://gist.github.com/jlongster/a1b9405ce4ee9360254cbfb35e8b7013
Running that code gives an error: "Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions"
The real error should be `Binary operator '*' cannot be applied to operands of type 'Int' and 'Double'`, and the fix is using `Double(index)` instead of just `index`. The above error message is strange given that it's not that complex of an expression.
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 itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationtype checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis