mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
While Span is present, we don't yet have an official way to create Span instances. Until then, put uses of Span and RawSpan behind an experimental feature flag (`Span`) that must be set to use these. Addresses rdar://139308307.
13 lines
459 B
Swift
13 lines
459 B
Swift
// RUN: %target-typecheck-verify-swift -verify-additional-prefix missing-
|
|
// RUN: %target-typecheck-verify-swift -enable-experimental-feature Span
|
|
// REQUIRES: swift_feature_Span
|
|
|
|
@available(SwiftStdlib 6.1, *)
|
|
func f(_: Span<Int>) { }
|
|
// expected-missing-error@-1{{'Span' requires -enable-experimental-feature Span}}
|
|
|
|
|
|
@available(SwiftStdlib 6.1, *)
|
|
func g(_: RawSpan) { }
|
|
// expected-missing-error@-1{{'RawSpan' requires -enable-experimental-feature Span}}
|