Skip to content

[SR-7504] Too complex expression involving single UInt64 variable #50046

Open
@krzyzanowskim

Description

@krzyzanowskim
Previous ID SR-7504
Radar None
Original Reporter @krzyzanowskim
Type Bug

Attachment: Download

Environment

Version 9.3 (9E145), Swift 4.1

Apple Swift version 4.1 (swiftlang-902.0.48 clang-902.0.37.1)
Target: x86_64-apple-darwin17.5.0

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

md5: 7353c2a1a5bb2c072e1887e653bdb177

Issue Description:

This fairly simple calculation is too complex to be solved in Swift 4.1. This is rather a regression as it worked in Swift 4.0

where x is UInt64

var x: UInt64 = ((x >> (6 * 1)) & 0xFF) << (8 * 0) | // Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions
        ((x >> (6 * 3)) & 0xFF) << (8 * 1)
return x

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions