Files
swift-mirror/test/Driver/swift-version-7-no-asserts.swift
Allan Shortlidge 47454e3f03 Basic: Add support for -swift-version 7 to asserts mode compilers.
Begin accepting `-swift-version 7` in asserts compilers so that we can begin to
test source-breaking changes intended for the next language version mode, such
as diagnostics that need to be staged in without breaking existing code. There
are no announced plans yet for a language mode after Swift 6, so 7 serves as a
placeholder for some future language mode.

Tests that wish to use `-swift-version 7` currently must be marked with
`REQUIRES: swift7` or they will fail in no-asserts bots. The simplest pattern
is probably to duplicate part or all of the pre-Swift 7 test to check that will
behave as intended in Swift 7.
2024-08-18 23:01:25 -07:00

6 lines
298 B
Swift

// RUN: not %target-swiftc_driver -swift-version 7 -typecheck %s 2>&1 | %FileCheck --check-prefix ERROR_7 %s
// REQUIRES: no_asserts
// ERROR_7: <unknown>:0: error: invalid value '7' in '-swift-version 7'
// ERROR_7: <unknown>:0: note: valid arguments to '-swift-version' are '4', '4.2', '5', '6'