[swift-users] Expression was too complex to be solved in reasonable time

Nate Birkholz nbirkholz at gmail.com
Tue Oct 24 17:05:31 CDT 2017

Doing a tutorial from RayWenderlich.

I have four bool values: topLeft, bottomLeft, topRight, and bottomRight

the following line throws an error:
let value = Int(topLeft.hashValue) | Int(topRight.hashValue) << 1 |
Int(bottomLeft.hashValue) << 2 | Int(bottomRight.hashValue) << 3

"Expression was too complex to be solved in reasonable time; consider
breaking up the expression into distinct sub-expressions."

This seems like a bug in the compiler, no? Is there actually a way to break
that up?

Nate Birkholz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20171024/fa1a49e6/attachment.html>

More information about the swift-users mailing list