File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
- // RUN: %empty-directory(%t)
2
- // RUN: %{python} %utils/split_file.py -o %t %s
1
+ // RUN: split-file %s %t
3
2
4
3
// RUN: %target-swift-frontend-typecheck -verify -disable-availability-checking %t/main.swift -package-name myPkg
5
4
// RUN: %target-swift-frontend-typecheck -verify -disable-availability-checking %t/A.swift -package-name myPkg
6
5
// RUN: %target-swift-frontend-typecheck -verify -disable-availability-checking %t/B.swift -package-name myPkg
7
6
// RUN: %target-swift-frontend-typecheck -verify -disable-availability-checking %t/D.swift -package-name myPkg
8
7
// RUN: not %target-swift-frontend-typecheck -verify -disable-availability-checking %t/C.swift -package-name myPkg 2>&1 | %FileCheck %s
9
8
10
- // BEGIN main.swift
9
+ //--- main.swift
11
10
package ( set) public var a : String // should pass when `package` modifier is used at top level decls
12
11
public package ( set) var b : String
13
12
package let c : Int
14
13
package var d : Int
15
14
package func f( ) { }
15
+ package func package ( ) { }
16
+ package ( )
16
17
17
- // BEGIN A.swift
18
+ //--- A.swift
18
19
package class package { // package can be a type name
19
20
package init ( ) { }
20
21
package var package : String ? // package can be a var name
@@ -38,19 +39,19 @@ public class MyClass {
38
39
}
39
40
}
40
41
41
- // BEGIN B.swift
42
+ //--- B.swift
42
43
public class Foo {
43
44
package ( set) public var x : String ?
44
45
public package ( set) var y : Int ?
45
46
}
46
47
47
- // BEGIN C.swift
48
+ //--- C.swift
48
49
public class Bar {
49
50
package package ( set) package : String ? // CHECK: warning: 'package(set)' modifier is redundant for a package var
50
51
package ( set ) package package : String ? // CHECK: warning: 'package(set)' modifier is redundant for a package var
51
52
}
52
53
53
- // BEGIN D.swift
54
+ //--- D.swift
54
55
enum MyColor {
55
56
case red, green, blue
56
57
}
You can’t perform that action at this time.
0 commit comments