Files
swift-mirror/test/expr/capture/noescape-error.swift
2018-07-26 23:13:43 -07:00

11 lines
284 B
Swift

// RUN: %target-typecheck-verify-swift
class C {}
class D {}
func f1(f : (inout Int) -> ()) {}
func f2(f : (inout Any) -> ()) {
f1 { f(&$0) } // expected-error{{inout argument could be set to a value with a type other than 'Int'; use a value declared as type 'Any' instead}}
}