Commit Graph

3 Commits

Author SHA1 Message Date
Pavel Yaskevich
66a79301b4 [CSDiagnostics] Diagnose contextual closure result mismatches via fixes
Let's keep track of type mismatch between type deduced
for the body of the closure vs. what is requested
contextually, it makes it much easier to diagnose
problems like:

```swift
func foo(_: () -> Int) {}
foo { "hello" }
```

Because we can pin-point problematic area of the source
when the rest of the system is consistent.

Resolves: rdar://problem/40537960
2018-11-07 14:28:50 -08:00
Slava Pestov
d466ddfe6e %target-typecheck-verify-swift already expands to the file name 2018-04-30 18:57:17 -06:00
Pavel Yaskevich
134f4e5611 [Diagnostics] Fix a crash when using withoutActuallyEscaping incorrectly
Teach `eraseOpenedExistentials` how to handle `OpaqueValueExpr`
associated with `MakeTemporarilyEscapableExpr`.

Resolves: rdar://problem/35773761
2018-03-23 14:41:30 -07:00