mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
forced conversion to "_ -> T" if it will refine the type otherwise found by doing a non-contextual type check. This allows us to diagnose calls to non-function values with more specificity, e.g. adding another case were we recommend "do" when using bare braces. Swift SVN r31726
11 lines
264 B
Swift
11 lines
264 B
Swift
// RUN: %target-parse-verify-swift %clang-importer-sdk
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import CoreMIDI
|
|
|
|
func test() -> String {
|
|
let s: String = MIDIGetNumberOfDevices() // expected-error {{cannot convert value of type 'Int' to specified type 'String'}}
|
|
return s
|
|
}
|