mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ModuleInterface] Allow global/static variables without initial values
This commit is contained in:
@@ -22,6 +22,9 @@ public class TestClass {
|
||||
// CHECK: public var prop: Int{{$}}
|
||||
public var prop: Int { get set }
|
||||
|
||||
// CHECK: public static var propWithNoAccessors: Int{{$}}
|
||||
public static var propWithNoAccessors: Int
|
||||
|
||||
// NEGATIVE-NOT: deinit
|
||||
deinit
|
||||
} // CHECK: {{^}$}}
|
||||
@@ -42,6 +45,9 @@ public enum TestEnum {
|
||||
|
||||
// CHECK: public var prop: Int{{$}}
|
||||
public var prop: Int { get set }
|
||||
|
||||
// CHECK: public static var propWithNoAccessors: Int{{$}}
|
||||
public static var propWithNoAccessors: Int
|
||||
} // CHECK: {{^}$}}
|
||||
|
||||
// CHECK-LABEL: public struct TestStruct
|
||||
@@ -57,8 +63,14 @@ public struct TestStruct {
|
||||
|
||||
// CHECK: public var prop: Int{{$}}
|
||||
public var prop: Int { get set }
|
||||
|
||||
// CHECK: public static var propWithNoAccessors: Int{{$}}
|
||||
public static var propWithNoAccessors: Int
|
||||
} // CHECK: {{^}$}}
|
||||
|
||||
// CHECK: public let globalWithNoAccessors: Int{{$}}
|
||||
public let globalWithNoAccessors: Int
|
||||
|
||||
// CHECK: public var readOnlyVar: Int { get }{{$}}
|
||||
public var readOnlyVar: Int { get }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user