Files
swift-mirror/test/ClangModules/CoreMIDI_test.swift
Chris Lattner f571e64161 Enhance visitCallExpr in the face of a contextual type. Only perform the
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
2015-09-06 19:01:47 +00:00

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
}