Swift 4 - 表达太复杂,无法在合理的时间内解决

时间:2017-09-27 15:12:42

标签: swift compiler-errors

转向Swift 4,给出错误"表达式太复杂,无法在合理的时间内解决;考虑将表达式分解为不同的子表达式"

let value =
  Int(topLeft.hashValue) |
  Int(topRight.hashValue) << 1 |
  Int(bottomLeft.hashValue) << 2 |
  Int(bottomRight.hashValue) << 3

enter image description here

1 个答案:

答案 0 :(得分:1)

var value = topLeft.hashValue
    value = value | topRight.hashValue << 1
    value = value | bottomLeft.hashValue << 2
    value = value | bottomRight.hashValue << 3