Commit Graph

2 Commits

Author SHA1 Message Date
Pavel Yaskevich
652b58b415 [TypeChecker] NFC: Add a couple of additional tests for invalid partial apply
Verify that invalid partial apply is detected if base of the
mutating method if unknown upfront.
2019-01-25 14:18:11 -08:00
Joe Groff
28fc7b0c80 Sema: Diagnose completely unapplied references to mutating methods.
The currying behavior of method references completely breaks in the face of `inout` semantics, even moreso with exclusivity enforcement, but we failed to diagnose these references in Swift 4 and previous versions. Raise a compatibility warning when these references are found in Swift 4 code, or error in Swift 5 and later. Simplify the partial application logic here slightly too now that standalone functions do not allow currying. Addresses rdar://problem/41361334 | SR-8074.
2018-06-29 21:04:42 -07:00