Commit Graph

1208 Commits

Author SHA1 Message Date
Pavel Yaskevich
a564042fdc [Diagnostics] Port missing explicit conversion to new abstraction 2018-08-09 17:01:54 -07:00
Pavel Yaskevich
9f9904b65d [Diagnostics] Port missing & diagnostic to new abstraction 2018-08-09 13:57:57 -07:00
Pavel Yaskevich
284e109f1e [Diagnostics] Try to compute precise diagnostic anchor 2018-08-09 13:53:33 -07:00
Pavel Yaskevich
f5aa0d9c75 [Diagnostics] Port missing force downcast diagnostic to new abstraction 2018-08-09 11:56:19 -07:00
Pavel Yaskevich
157dc719e0 [Diagnostics] Port implicitly escaping to type conversion diagnostics to new abstraction 2018-08-09 11:05:33 -07:00
Pavel Yaskevich
ba085e5bdc [Diagnostics] Improve missing conformance diagnostics for sub-types and members
If generic parameter associated with missing conformance comes
from different context diagnose the problem as "referencing" a
specific declaration from affected type.
2018-08-07 18:55:43 -07:00
Pavel Yaskevich
ad171e05cc [Diagnostics] Improve missing conformance diagnostics by using affected declaration
Instead of simply pointing out which type had conformance failures,
let's use affected declaration instead, which makes diagnostics much
richer e.g.

```
'List<[S], S.Id>' requires that 'S.Id' conform to 'Hashable'
```

versus

```
initializer 'init(_🆔)' requires that 'E' conform to 'Hashable' [with 'E' = 'S.Id']
```

Since latter message uses information about declaration, it can also
point to it in the source. That makes is much easier to understand when
problem is related to overloaded (function) declarations.
2018-08-07 12:59:53 -07:00
Pavel Yaskevich
776485878f [ConstraintSystem] NFC: Move new diagnostics into separate files - Diagnostics.(h|cpp) 2018-08-06 13:08:47 -07:00