Allow @NSManaged to be applied to methods.

Core Data synthesizes Key-Value-Coding-compliant accessors for @NSManaged
properties, but Swift won't allow them to be called without predeclaring
them.

In practice, '@NSManaged' on a method is the same as 'dynamic', except
you /can't/ provide a body and overriding it won't work. This is not the
long-term model we want (see rdar://problem/20829214), but it fixes a
short-term issue with an unfortunate workaround (go through
mutableOrderedSetValueForKey(_:) and similar methods).

rdar://problem/17583057

Swift SVN r30523
This commit is contained in:
Jordan Rose
2015-07-23 02:08:55 +00:00
parent d980700f17
commit 0733ba42c9
17 changed files with 161 additions and 80 deletions

View File

@@ -51,7 +51,7 @@ const uint16_t VERSION_MAJOR = 0;
/// To ensure that two separate changes don't silently get merged into one
/// in source control, you should also update the comment to briefly
/// describe what change you made.
const uint16_t VERSION_MINOR = 206; // Last change: add reabstraction_thunk type
const uint16_t VERSION_MINOR = 207; // Last change: @NSManaged on methods
using DeclID = Fixnum<31>;
using DeclIDField = BCFixed<31>;