mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Instead of requiring sub-classes of `ContextualMismatch` to implement `diagnoseForAmbiguity` let's implement it directly on `ContextualMismatch` itself and check whether all of the aggregated fixes have same types on both sides and if so, diagnose as-if it was a single fix.
6 lines
215 B
Swift
6 lines
215 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
func foo(chr: Character) -> String {
|
|
return String(repeating: String(chr)) // expected-error {{missing argument for parameter 'count' in call}} {{39-39=, count: <#Int#>}}
|
|
}
|