mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -45,11 +45,12 @@ func method(@#^KEYWORD1^#) {}
|
||||
@#^KEYWORD2^#
|
||||
func method(){}
|
||||
|
||||
// KEYWORD2: Begin completions, 8 items
|
||||
// KEYWORD2: Begin completions, 9 items
|
||||
// KEYWORD2-NEXT: Keyword/None: available[#Func Attribute#]; name=available{{$}}
|
||||
// KEYWORD2-NEXT: Keyword/None: objc[#Func Attribute#]; name=objc{{$}}
|
||||
// KEYWORD2-NEXT: Keyword/None: noreturn[#Func Attribute#]; name=noreturn{{$}}
|
||||
// KEYWORD2-NEXT: Keyword/None: IBAction[#Func Attribute#]; name=IBAction{{$}}
|
||||
// KEYWORD2-NEXT: Keyword/None: NSManaged[#Func Attribute#]; name=NSManaged{{$}}
|
||||
// KEYWORD2-NEXT: Keyword/None: inline[#Func Attribute#]; name=inline{{$}}
|
||||
// KEYWORD2-NEXT: Keyword/None: nonobjc[#Func Attribute#]; name=nonobjc{{$}}
|
||||
// KEYWORD2-NEXT: Keyword/None: warn_unused_result[#Func Attribute#]; name=warn_unused_result{{$}}
|
||||
|
||||
Reference in New Issue
Block a user