Commit Graph

6 Commits

Author SHA1 Message Date
Sam Lazarus
cd0cc3c2c4 Test: Add a todo about a regression introduced by generic mismatch diagnostic 2019-06-14 12:35:32 -04: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
gregomni
d604047625 When root type of a keypath is unresolved by the constraint system, use the root interface type for diagnosis. 2018-07-31 17:15:12 -07:00
Mark Lacey
fea720f229 [MiscDiagnostics] Emit a deprecation warning for some writes through literal keypaths.
We incorrectly allowed some keypaths to be inferred as writable
keypaths in Swift 3/4 modes. This no longer happens when
-swift-version 5 is specified.

This warning is a limited attempt at providing some advanced notice of
code that will break, only in the cases where the keypath is a direct
argument to a keypath subscript write.

Fixes: rdar://problem/40068274
2018-06-25 23:03:06 -07:00
Mark Lacey
9687615d58 Fix RUN lines in a couple constraint solver tests. 2018-06-19 12:57:05 -07:00
Mark Lacey
83ebd71644 Allowing forming WritableKeyPath to read-only value in Swift 3/4.
We inadvertantly allowed this in the past, so continue to do so when
compiling in Swift 3/4 mode to avoid suddenly breaking existing code.

The diagnostic here is pretty bad, and I've opened issues for that as
well as providing some kind of deprecation warning for this so that
even under Swift 3/4 mode we alert users that this is unsupported.

rdar://problem/39802797
2018-05-08 14:26:02 -07:00