mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ASTPrinter: Fix printing of let properties inside @objc @implementation extensions
A `let` here is really just a `var` with a `{ get }`.
Fixes rdar://problem/127120469.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
- (nonnull instancetype)init;
|
||||
|
||||
@property (readonly) int letProperty1;
|
||||
@property (assign) int implProperty;
|
||||
|
||||
- (void)mainMethod:(int)param;
|
||||
|
||||
@@ -42,6 +42,12 @@ import Foundation
|
||||
didSet { print(implProperty) }
|
||||
}
|
||||
|
||||
// CHECK-NOT: var letProperty1:
|
||||
@objc public let letProperty1: Int32
|
||||
|
||||
// CHECK-DAG: @nonobjc public var letProperty2: Swift.Int32 { get }
|
||||
@nonobjc public let letProperty2: Int32
|
||||
|
||||
// CHECK-DAG: final public var implProperty2: ObjectiveC.NSObject? { get set }
|
||||
public final var implProperty2: NSObject?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user