mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Don't synth "materializeForSet" for @objc protocol requirements.
Another fix for rdar://problem/18706056. This should make @NSManaged properties work fine with @objc protocols, but I expect us to still be broken with native protocols. Swift SVN r24862
This commit is contained in:
@@ -953,7 +953,11 @@ void TypeChecker::synthesizeWitnessAccessorsForStorage(
|
||||
|
||||
// Otherwise, if the requirement is settable, ensure that there's a
|
||||
// materializeForSet function.
|
||||
if (requirement->getSetter() && !storage->getMaterializeForSetFunc()) {
|
||||
//
|
||||
// @objc protocols don't need a materializeForSet since ObjC doesn't have
|
||||
// that concept.
|
||||
if (!requirement->isObjC() &&
|
||||
requirement->getSetter() && !storage->getMaterializeForSetFunc()) {
|
||||
FuncDecl *materializeForSet = addMaterializeForSet(storage, *this);
|
||||
synthesizeMaterializeForSet(materializeForSet, storage, *this);
|
||||
typeCheckDecl(materializeForSet, true);
|
||||
|
||||
Reference in New Issue
Block a user