Skip to content

[SR-7087] Chaining simple calculations make a too-complex error by the compiler or REPL  #49635

@swift-ci

Description

@swift-ci
Previous ID SR-7087
Radar None
Original Reporter mshibanami (JIRA User)
Type Bug

Attachment: Download

Environment

$swift --version
Apple Swift version 4.1 (swiftlang-902.0.38 clang-902.0.30)
Target: x86_64-apple-darwin17.4.0

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

md5: b6131e9d1dd61e2a8934a8d225450e18

Issue Description:

The following expression makes "expression was too complex to be solved in reasonable time" error by REPL or Compiler:

(Optional(1) ?? 1) * 1 * 1 * 1 * 1 * 1 * 1

It looks "Optional(1) ?? 1" part causes this problem.

I don't think this is a expected behavior.So I opened this issue.

See also the attached screen capture.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions