How can I find the operator definition in Swift?

前端 未结 1 1769
失恋的感觉
失恋的感觉 2020-12-22 11:09

I write code below:

let array1: [Int] = [0,1]
let array2 = array1 + [2]

It just works.I want to find where + operator define.

相关标签:
1条回答
  • 2020-12-22 11:33

    You can select the operator in the Xcode source editor, and choose "Navigate -> Jump to definition" from the menu, or press CMD+CTRL+J.

    (This was broken in Xcode 10, but works again in Xcode 11, which is currently in beta.)

    0 讨论(0)
提交回复
热议问题