Commit Graph

5 Commits

Author SHA1 Message Date
John McCall
4f4d64b93e Various improvements to the variable-is-never-mutated diagnostic.
The main fixes here are:
- we weren't looking through open-existentials in the l-value
- we weren't handling mutating gets correctly unless CSApply wrapped
  the base in an InOutExpr, which seems to be multifile-sensitive
- we were missing diagnostics in some cases involving subscripts

A better fix would be to re-introduce LValueAccessKind, but I wanted
a workable short-term fix that I could try to get into 5.1.

Fixes rdar://49482742, which is specific to the lazy-getter problem.
2019-04-08 18:43:24 -04:00
Mark Lacey
78d83e5703 Use %target-typecheck-verify-swift where possible. 2018-07-26 23:13:43 -07:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Michael Ilseman
6d3376d503 [id as Any] Coerce keys to rvalues for checking Hashable conformance
lvalue Strings should first be coerced to rvalue Strings before
checking for Hashable protocol conformance.
2016-08-18 11:39:42 -07:00
Joe Groff
b9bc62dc93 Sema: Make Hashable-to-AnyHashable a Subtype rather than Conversion.
This admits AnyHashable in collection downcasts, though runtime support for the dynamic cast still appears to be incomplete. rdar://problem/27869032
2016-08-16 17:14:34 -07:00