[ModuleInterface] Allow global/static variables without initial values

This commit is contained in:
Jordan Rose
2018-08-16 17:34:10 -07:00
parent f061dff9b7
commit 0ca78265ef
2 changed files with 51 additions and 23 deletions

View File

@@ -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 }