mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Some of the expressions call into `typeCheckExpressionShallow` while trying to apply solutions, we need to respect the fact that sub-expressions might be already properly type-checked while propagating l-value access kind. Resolves: rdar://problem/38309176
10 lines
370 B
Swift
10 lines
370 B
Swift
// RUN: %target-typecheck-verify-swift %s
|
|
|
|
func foo(_ msg: Int) {}
|
|
func foo(_ msg: Double) {}
|
|
|
|
func rdar38309176(_ errors: inout [String]) {
|
|
foo("error: \(errors[0])") // expected-error {{cannot invoke 'foo' with an argument list of type '(String)'}}
|
|
// expected-note@-1 {{overloads for 'foo' exist with these partially matching parameter lists: (Int), (Double)}}
|
|
}
|