Files
swift-mirror/test/SILGen/bitwise_copyable_stdlib.swift
Kavon Farvardin 0420310623 NCGenerics: it's no longer "experimental"
resolves rdar://127701059
2024-05-08 10:49:12 -07:00

29 lines
1.1 KiB
Swift

// R N: %target-swift-frontend -enable-experimental-feature NonescapableTypes -enable-experimental-feature BuiltinModule -parse-stdlib -module-name Swift -DEMPTY -emit-sil -verify %s
// RUN: %target-swift-frontend \
// RUN: -emit-sil \
// RUN: %s \
// RUN: -parse-stdlib \
// RUN: -module-name Swift \
// RUN: -disable-availability-checking \
// RUN: -enable-experimental-feature BuiltinModule \
// RUN: -enable-experimental-feature NonescapableTypes \
// RUN: -enable-builtin-module
// REQUIRES: asserts
// Force verification of TypeLowering's isTrivial.
import Builtin
@_marker public protocol Copyable: ~Escapable {}
@_marker public protocol Escapable: ~Copyable {}
@_marker public protocol BitwiseCopyable : ~Escapable {}
struct Storage : ~Escapable, BitwiseCopyable {}
func take<T : BitwiseCopyable & ~Escapable>(_ t: T) {}
func passStorage(_ s: Storage) { take(s) }