Skip to content

Commit 57d0bf8

Browse files
committed
[Test] Add a test case for function and property declarations in the
overload set for an argument to a method `#selector`.
1 parent beaaee7 commit 57d0bf8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/expr/primary/selector/selector.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,16 @@ extension SomeProtocol {
157157
let _ = #selector(anotherFunction) // expected-error {{cannot use 'anotherFunction' as a selector because protocol 'SomeProtocol' is not exposed to Objective-C}} {{none}}
158158
}
159159

160-
func anotherFunction() {
160+
func anotherFunction() {
161161
print("Hello world!")
162162
}
163163
}
164+
165+
@objc class OverloadedFuncAndProperty {
166+
@objc static func f() {}
167+
@objc var f: Int { 0 }
168+
}
169+
170+
func test() -> Selector {
171+
#selector(OverloadedFuncAndProperty.f)
172+
}

0 commit comments

Comments
 (0)