Files
swift-mirror/test/embedded/basic-errors-no-stdlib.swift

11 lines
334 B
Swift

// RUN: %target-swift-frontend -emit-ir -verify %s -parse-stdlib -enable-experimental-feature Embedded -wmo
// REQUIRES: swift_in_compiler
public protocol Player {}
struct Concrete: Player {}
public func test() -> any Player {
Concrete() // expected-error {{cannot use a value of protocol type 'any Player' in embedded Swift}}
}