mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
13 lines
386 B
Swift
13 lines
386 B
Swift
// RUN: %target-swift-emit-ir -verify %s -enable-experimental-feature Embedded -wmo
|
|
|
|
// REQUIRES: swift_in_compiler
|
|
// REQUIRES: optimized_stdlib
|
|
// REQUIRES: swift_feature_Embedded
|
|
|
|
public func foo() {
|
|
let number = 42
|
|
_ = withUnsafeBytes(of: number) { bytes in
|
|
bytes.map(\.description).joined(separator: ".") // expected-error {{cannot use key path in embedded Swift}}
|
|
}
|
|
}
|