Skip to content

[SR-10229] TypeCheck error: Compiler is unable to type check this expression in reasonable time #52629

@swift-ci

Description

@swift-ci
Previous ID SR-10229
Radar None
Original Reporter gcampos (JIRA User)
Type Bug
Environment

MacOS

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

md5: 75e1ad8611675120f730a733cc525897

Issue Description:

On swift 5.0

This code doesn't compile due to error "Compiler is unable to type check this expression in reasonable time"

import Foundation


let padding: CGFloat = 1
let stroke: CGFloat = 15
let origin: CGFloat = 2
let handleViewHeight: CGFloat = 1


_ = CGPoint(x: 1, y: (origin + (padding + handleViewHeight/2 + stroke/2))/1.75)

But on swift 4.2 compiles without any problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfperformanceregressionswift 5.0type checkerArea → compiler: Semantic analysis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions