mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The fix for https://github.com/apple/swift/pull/72632 was not sufficient because when modules are built from textual interface that happens in a sub-invocation which does not have typecheck-from-interface or compile-from-interface requested action. Instead of checking a requested action, set a language option to control whether non-production experimental features are allowed. Resolves rdar://125561443
15 lines
596 B
Swift
15 lines
596 B
Swift
// This test verifies that command line parsing restricts use of features that
|
|
// are not allowed non-production compilers.
|
|
|
|
// REQUIRES: no_asserts
|
|
|
|
// 'AccessLevelOnImport' is allowed in production
|
|
// RUN: %target-swift-frontend -typecheck %s -enable-experimental-feature AccessLevelOnImport -verify
|
|
|
|
// 'ParserValidation' is NOT allowed in production
|
|
// RUN: not %target-swift-frontend -typecheck %s -enable-experimental-feature ParserValidation 2>&1 | %FileCheck %s
|
|
|
|
// CHECK: <unknown>:0: error: experimental feature 'ParserValidation' cannot be enabled in production compiler
|
|
|
|
import Swift
|