Skip to content

Commit 9f48b37

Browse files
authored
Merge pull request #67838 from tshortli/parse-as-library-module-interface-tests
NFC: Update lit.cfg to specify -parse-as-library for module interface tests
2 parents 64eb9df + 7bb2d82 commit 9f48b37

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test/ModuleInterface/closure.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
// CHECK: public let MyClosureVar: (Swift.Int) -> Swift.Int
1010
public let MyClosureVar: (Int) -> Int = { $0 }
1111

12-
// CHECK: public var MyOtherClosureVar: (_ x: Swift.Int) -> Swift.Int
13-
public let MyOtherClosureVar: (_ x: Int) -> Int
12+
// CHECK: public let MyOtherClosureVar: (_ x: Swift.Int) -> Swift.Int
13+
public let MyOtherClosureVar: (_ x: Int) -> Int = { x in x }

test/ModuleInterface/moveonly_interface_flag.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
7// RUN: %empty-directory(%t)
1+
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -module-name Library -enable-experimental-feature MoveOnlyResilientTypes
33
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -I %t -enable-experimental-feature MoveOnlyResilientTypes
44
// RUN: %FileCheck %s < %t/Library.swiftinterface

test/lit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2481,7 +2481,7 @@ config.substitutions.append(('%target-msvc-runtime-opt',
24812481
config.substitutions.append(('%target-swift-emit-module-interfaces\(([^)]+),\w*([^)]+)\)',
24822482
SubstituteCaptures(r'%target-swift-emit-module-interface(\1) -emit-private-module-interface-path \2')))
24832483
config.substitutions.append(('%target-swift-emit-module-interface\(([^)]+)\)',
2484-
SubstituteCaptures(r'%target-swift-frontend -swift-version 5 -enable-library-evolution -typecheck -emit-module-interface-path \1')))
2484+
SubstituteCaptures(r'%target-swift-frontend -swift-version 5 -enable-library-evolution -parse-as-library -typecheck -emit-module-interface-path \1')))
24852485

24862486
config.substitutions.append(('%target-swift-typecheck-module-from-interface\(([^)]+)\)',
24872487
SubstituteCaptures(r'%target-swift-frontend -swift-version 5 -enable-library-evolution -typecheck-module-from-interface \1')))

0 commit comments

Comments
 (0)