mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
15 lines
666 B
Swift
15 lines
666 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
var stream = ""
|
|
|
|
print(3, &stream) // expected-error{{'&' used with non-inout argument of type 'Any'}}
|
|
debugPrint(3, &stream) // expected-error{{'&' used with non-inout argument of type 'Any'}}
|
|
|
|
print(3, &stream, appendNewline: false) // expected-error {{extra argument 'appendNewline' in call}}
|
|
// expected-error@-1:10 {{'&' used with non-inout argument of type 'Any'}}
|
|
|
|
debugPrint(3, &stream, appendNewline: false) // expected-error {{extra argument 'appendNewline' in call}}
|
|
// expected-error@-1:15 {{'&' used with non-inout argument of type 'Any'}}
|
|
|
|
print(4, quack: 5) // expected-error {{extra argument 'quack' in call}}
|