chy1626230233
xcww1234
2015-11-18 13:18

swift改动所造成的错误

  • 编译出错
  • if let operand = operandEvaluation.result { return (operation(operand), operandEvaluation.result) }

出错原因:initializer for conditional binding must have optional type ,not "Double"

  • return (nil, ops)

    出错原因:nil is incompatible with reture type "Double"

  • return evaluate()

出错原因:unexpected non-void return value in void function

在Xcode6编译可以成功,但是Xcode7.1出错了,请问应该怎么改动才能正确

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐

换一换