Files
swift-mirror/test/ModuleInterface/language_mode.swift
Allan Shortlidge e2c8235a2c Frontend: Temporarily downgrade 'error_module_interface_requires_language_mode'.
Downgrade the new error in https://github.com/swiftlang/swift/pull/84244 to a
warning.

The PR smoke test build is using a different build system that is failing to
pass `-swift-version` arguments when building various stdlib modules. That
needs to be fixed, but for now we also need to unblock CI.
2025-09-15 14:10:24 -07:00

28 lines
1.2 KiB
Swift

// RUN: %empty-directory(%t)
// RUN: %swift_frontend_plain -target %target-swift-5.1-abi-triple %s \
// RUN: -enable-library-evolution -module-name Test \
// RUN: -emit-module-interface-path %t.swiftinterface \
// RUN: -emit-module -o /dev/null 2>&1 | %FileCheck %s
// CHECK: <unknown>:0: warning: emitting module interface files requires '-language-mode'
// RUN: %swift_frontend_plain -target %target-swift-5.1-abi-triple %s \
// RUN: -enable-library-evolution -module-name Test \
// RUN: -emit-module-interface-path %t.swiftinterface \
// RUN: -emit-module -o /dev/null -language-mode 5
// RUN: %FileCheck %s --check-prefix CHECK-SWIFTINTERFACE < %t.swiftinterface
// RUN: %swift_frontend_plain -target %target-swift-5.1-abi-triple %s \
// RUN: -enable-library-evolution -module-name Test \
// RUN: -emit-module-interface-path %t.swiftinterface \
// RUN: -emit-module -o /dev/null -swift-version 5
// RUN: %FileCheck %s --check-prefix CHECK-SWIFTINTERFACE < %t.swiftinterface
// CHECK-SWIFTINTERFACE: swift-module-flags:
// CHECK-SWIFTINTERFACE-SAME: -enable-library-evolution
// CHECK-SWIFTINTERFACE-SAME: -module-name Test
// CHECK-SWIFTINTERFACE-SAME: {{-swift-version|-language-mode}} 5