Skip to content

Commit 4500917

Browse files
committed
update test
1 parent 77b5c79 commit 4500917

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

test/Sema/accessibility_package_contextual_keyword.swift

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
// RUN: %empty-directory(%t)
2-
// RUN: %{python} %utils/split_file.py -o %t %s
1+
// RUN: split-file %s %t
32

43
// RUN: %target-swift-frontend-typecheck -verify -disable-availability-checking %t/main.swift -package-name myPkg
54
// RUN: %target-swift-frontend-typecheck -verify -disable-availability-checking %t/A.swift -package-name myPkg
65
// RUN: %target-swift-frontend-typecheck -verify -disable-availability-checking %t/B.swift -package-name myPkg
76
// RUN: %target-swift-frontend-typecheck -verify -disable-availability-checking %t/D.swift -package-name myPkg
87
// RUN: not %target-swift-frontend-typecheck -verify -disable-availability-checking %t/C.swift -package-name myPkg 2>&1 | %FileCheck %s
98

10-
// BEGIN main.swift
9+
//--- main.swift
1110
package(set) public var a: String // should pass when `package` modifier is used at top level decls
1211
public package(set) var b: String
1312
package let c: Int
1413
package var d: Int
1514
package func f() {}
15+
package func package() {}
16+
package()
1617

17-
// BEGIN A.swift
18+
//--- A.swift
1819
package class package { // package can be a type name
1920
package init() {}
2021
package var package: String? // package can be a var name
@@ -38,19 +39,19 @@ public class MyClass {
3839
}
3940
}
4041

41-
// BEGIN B.swift
42+
//--- B.swift
4243
public class Foo {
4344
package(set) public var x: String?
4445
public package(set) var y: Int?
4546
}
4647

47-
// BEGIN C.swift
48+
//--- C.swift
4849
public class Bar {
4950
package package(set) package: String? // CHECK: warning: 'package(set)' modifier is redundant for a package var
5051
package(set) package package: String? // CHECK: warning: 'package(set)' modifier is redundant for a package var
5152
}
5253

53-
// BEGIN D.swift
54+
//--- D.swift
5455
enum MyColor {
5556
case red, green, blue
5657
}

0 commit comments

Comments
 (0)