Files
swift-mirror/test/Interop/Cxx/driver/invalid-interop-compat-mode.swift
Alex Lorenz d7b62b3c40 [cxx-interop] add 'upcoming-swift' compat version
This version will be used to gate new source breaking changes for C++ interoperability
2023-07-25 16:19:58 -07:00

22 lines
712 B
Swift

// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: not %target-swift-frontend -typecheck -I %t/Inputs %t/test.swift -cxx-interoperability-mode=swift-5.8 2>&1 | %FileCheck %s
// RUN: %target-swift-frontend -typecheck -I %t/Inputs %t/test.swift -cxx-interoperability-mode=swift-5.9
// RUN: %target-swift-frontend -typecheck -I %t/Inputs %t/test.swift -cxx-interoperability-mode=upcoming-swift
//--- Inputs/module.modulemap
module Test {
header "test.h"
requires cplusplus
}
//--- Inputs/test.h
//--- test.swift
import Test
// CHECK: error: invalid value 'swift-5.8' in '-cxx-interoperability-mode=swift-5.8'
// CHECK: note: valid arguments to '-cxx-interoperability-mode=' are 'off', 'default'