- Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathexperimental-features.swift
25 lines (18 loc) · 913 Bytes
/
experimental-features.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// RUN: %empty-directory(%t)
// RUN: split-file %s %t
// 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 -typecheck %t/Client.swift -I %t
// RUN: %target-swift-frontend -compile-module-from-interface -module-name ExperimentalFeatures -o /dev/null %t/ExperimentalFeatures.swiftinterface -verify
// RUN: %target-swift-frontend -typecheck-module-from-interface -module-name ExperimentalFeatures %t/ExperimentalFeatures.swiftinterface -verify
//--- ExperimentalFeatures.swiftinterface
// swift-interface-format-version: 1.0
// swift-module-flags: -module-name ExperimentalFeatures -enable-experimental-feature ParserRoundTrip
import Swift
extensionInt{
publicstaticvarfortytwo:Int=42
}
//--- Client.swift
import ExperimentalFeatures
_ =Int.fortytwo