Commit Graph

6 Commits

Author SHA1 Message Date
Pavel Yaskevich
cb3a0fbcc8 [ConstraintSystem] Extend use of the treat r-value as l-value fix to more cases
Cover not only immutability but also type mismatch cases and clarify
behavior when one of the sides of the type conversion is optional.
2019-11-05 12:38:13 -08:00
Pavel Yaskevich
a1643d94f7 [Diagnostics] NFC: Update all of the improved test-cases 2019-09-13 22:35:52 -07:00
gregomni
821f63fe98 Make assignments and assignment failure diagnoses directly in the CS.
More specific diagnoses for assigning to read-only keypaths.
'computeAssignDestType' is dead code now.
ConstraintFix shouldRecordFix()
2018-08-24 20:39:03 -07:00
Jordan Rose
ca1979c920 Improve diagnostics for setting a 'let' property in a delegating init 2017-11-09 18:08:01 -08: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
Slava Pestov
b2086fd2c0 AST: Fix false positives in ConstructorDecl::getDelegatingOrChainedInitKind()
Two fixes here:

1) Actually check if the ApplyExpr's base is self, instead of assuming
that anything other than a super call is a constructor call on self, to
avoid flagging UnresolvedConstructorExprs formed from Metatype.init()
calls as delegations.

2) Sometimes this is called after parts of the body has been type checked,
here we had the opposite problem, a ConstructorRefCallExpr of a
constructor on self wasn't detected as such.

Fixes <rdar://problem/21914985>.

Swift SVN r30852
2015-07-31 09:08:10 +00:00