mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
11 lines
284 B
Swift
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}}
|
|
}
|