Skip to content

Commit 0e2f5ac

Browse files
committed
[Diagnostics] Add test-case for rdar://problem/32490355
1 parent 4eb7aaf commit 0e2f5ac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: %target-swift-frontend -typecheck -verify %s
2+
3+
// REQUIRES: objc_interop
4+
// REQUIRES: OS=macosx
5+
6+
import Foundation
7+
import AVFoundation
8+
import AppKit
9+
10+
func foo(options: [AVMediaSelectionOption]) {
11+
let menuItems: [NSMenuItem] = options.map { (option: AVMediaSelectionOption) in
12+
NSMenuItem(title: option.displayName, action: #selector(NSViewController.respondToMediaOptionSelection(from:)), keyEquivalent: "")
13+
// expected-error@-1 {{type 'NSViewController' has no member 'respondToMediaOptionSelection(from:)'}}
14+
}
15+
}

0 commit comments

Comments
 (0)