Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0146-rdar38309176.swift
Pavel Yaskevich cdf6cb3f2c [CSApply] Don't try to force propagate l-value access in "shallow" mode
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
2018-03-15 18:07:51 -07:00

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)}}
}