mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We were implicitly assuming that a function reference could only happen
in an expression, ignoring the case of
import func Module.fooFunc
For now, this doesn't actually add the reference to the index because
initCallRefIndexSymbol doesn't allow references without a parent
expression. We can look at adding the reference, or maybe doing
something special to the import itself separately.
rdar://problem/26496135
33 lines
481 B
Swift
33 lines
481 B
Swift
public class Empty {}
|
|
|
|
public class TwoInts {
|
|
var x, y : Int
|
|
|
|
public init(a : Int, b : Int) {
|
|
x = a
|
|
y = b
|
|
}
|
|
}
|
|
|
|
public class ComputedProperty {
|
|
public var value : Int {
|
|
get {
|
|
var result = 0
|
|
return result
|
|
}
|
|
set(newVal) {
|
|
// completely ignore it!
|
|
}
|
|
}
|
|
}
|
|
|
|
public protocol Prot1 { }
|
|
public protocol Prot2 : Prot1 { }
|
|
public protocol Prot3 { }
|
|
|
|
public class C2 { }
|
|
|
|
extension C2 : Prot3, Prot1, Prot2 { }
|
|
|
|
public func globalFunc() {}
|