[SR-7087] Chaining simple calculations make a too-complex error by the compiler or REPL #49635
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
performance
type checker
Area → compiler: Semantic analysis
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
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.
The text was updated successfully, but these errors were encountered: