File tree Expand file tree Collapse file tree 1 file changed +22
-9
lines changed
test/Interop/Cxx/foreign-reference Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Original file line number Diff line number Diff line change 1- // RUN: %target-run-simple-swift(-cxx-interoperability-mode=default -Xfrontend -disable-availability-checking - I %S/Inputs) | %FileCheck %s
1+ // RUN: %target-run-simple-swift(-cxx-interoperability-mode=default -I %S/Inputs) | %FileCheck %s
22
33// REQUIRES: executable_test
44
1212import Printed
1313
1414func printCxxImmortalFRT( ) {
15- let s = ImmortalFRT ( )
16- print ( s)
15+ if #available( SwiftStdlib 6 . 2 , * ) {
16+ let s = ImmortalFRT ( )
17+ print ( s)
18+ } else {
19+ print ( " runtime too old " )
20+ }
1721}
1822
23+ @available ( SwiftStdlib 5 . 9 , * )
1924extension FRTCustomStringConvertible : CustomStringConvertible {
2025 public var description : String {
2126 return " FRTCustomStringConvertible(publ: \( publ) ) "
2227 }
2328}
2429
2530func printCxxFRTCustomStringConvertible( ) {
26- let s = FRTCustomStringConvertible ( )
27- print ( s)
31+ if #available( SwiftStdlib 5 . 9 , * ) {
32+ let s = FRTCustomStringConvertible ( )
33+ print ( s)
34+ } else {
35+ print ( " runtime too old " )
36+ }
2837}
2938
3039func printCxxFRType( ) {
31- let s = FRType ( )
32- print ( s)
40+ if #available( SwiftStdlib 6 . 2 , * ) {
41+ let s = FRType ( )
42+ print ( s)
43+ } else {
44+ print ( " runtime too old " )
45+ }
3346}
3447
3548printCxxImmortalFRT ( )
36- // CHECK: ImmortalFRT()
49+ // CHECK: {{ ImmortalFRT()|runtime too old}}
3750
3851printCxxFRTCustomStringConvertible ( )
3952// CHECK: FRTCustomStringConvertible(publ: 2)
4053
4154printCxxFRType ( )
42- // CHECK: FRType()
55+ // CHECK: {{ FRType()|runtime too old}}
You can’t perform that action at this time.
0 commit comments