Hello Xcode users,
I'm stuck with a weird editor behavior.
For example let's have those two files in a macOS Cocoa app :
Protocols.swift
//
// Protocols.swift
// testprotocoldefinition
//
import Foundation
protocol Test {
var isSetVar:Bool {get}
func isSetFunc() -> Bool
}
Implementations.swift
//
// Implementations.swift
// testprotocoldefinition
//
import Foundation
class Implementation : Test {
var isSetVar: Bool = true
func isSetFunc() -> Bool {
return true
}
}
When I do Navigate > Jump to Definition, or ctrl + cmd + click, or ctrl + cmd + J :
- on Test.isSetFunc, Xcode opens a popover where you can navigate to Test.isSetFunc or Implementation.isSetFunc, as expected
- on Test.isSetVar, nothing happens
- on Implementation.isSetFunc, Xcode navigate to Test.isSetFunc, as expected
- on Implementation.isSetVar, nothing happens.
Odd thing is when I try to Refactor > Rename... on Test.isSetVar,
Implementation.isSetVar is also selected to be refactored.
That means indexer does the job as expected.
Is it a known issue all developers can reproduce ?
How do you figure out to navigate from protocol vars to their implementations in the editor ?
I'm using Xcode 10.1 on macOS 10.14
I was experiencing this in Xcode 10.0 too
Thank you for your help
Kind regards
Maxime