mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
On non-asserts compilers, the following error is emitted: ``` <unknown>:0: error: experimental feature '<FEATURE>' cannot be enabled in a production compiler ```
10 lines
302 B
Swift
10 lines
302 B
Swift
// RUN: %target-swift-frontend -emit-ir -disable-availability-checking -primary-file %s %S/Inputs/implicit_some_b.swift -enable-experimental-feature ImplicitSome
|
|
|
|
// Because of -enable-experimental-feature ImplicitSome
|
|
// REQUIRES: asserts
|
|
|
|
protocol P {}
|
|
struct S: P {}
|
|
|
|
func foo() -> P { return S() }
|