mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When building a module from its interface, do not diagnose whether or not a feature is available in production compilers. This is important since older compilers may be expected to build .swiftinterfaces that were produced by newer compilers where the feature has been enabled by default. Resolves rdar://125500318
15 lines
613 B
Plaintext
15 lines
613 B
Plaintext
// swift-interface-format-version: 1.0
|
|
// swift-module-flags: -module-name ExperimentalFeatures -enable-experimental-feature ParserRoundTrip
|
|
|
|
// Building a module from this interface should always succeed, even though
|
|
// ParserRoundTrip is an experimental feature that is not enabled in production
|
|
// compilers.
|
|
|
|
// RUN: %target-swift-frontend -compile-module-from-interface -module-name ExperimentalFeatures -o /dev/null %s -verify
|
|
// RUN: %target-swift-frontend -typecheck-module-from-interface -module-name ExperimentalFeatures %s -verify
|
|
|
|
import Swift
|
|
extension Int {
|
|
public static var fortytwo: Int = 42
|
|
}
|