It is intended.
The swift version you provided is the swift version of Objective-C header.
So they are the same.
Zhao Xin
···
On Mon, Sep 4, 2017 at 8:01 PM, Adrian Zubarev via swift-users < swift-users@swift.org> wrote:
Hi there,
before filing a new issue I would like to ask if this is intended
behaviour or a bug:The Foundation class Operation which has it’s roots in Objective-C has a
few readonly properties like the following one:@available(iOS 2.0, *)
open class Operation : NSObject {
...
open var isExecuting: Bool { get }
...
}On the other hand the Objective-C header looks like this:
NS_CLASS_AVAILABLE(10_5, 2_0)
@interface NSOperation : NSObject {
...
@property (readonly, getter=isExecuting) BOOL executing;
...
@endNow I want to create a custom subclass of Operation and override
isExecuting, everything works fine until I try to create a private stored
property named executing:final class TransitionOperation : Operation {
// error: cannot override with a stored property 'executing'
private var executing = falseoverride var isExecuting: Bool {
...
}
}I’m a little bit confused here:
- Is this intended behaviour or a bug?
- The Foundation implemented in Swift is not used for iOS deployment,
instead the Obj-C one is used right?_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users