mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
12 lines
404 B
Swift
12 lines
404 B
Swift
// RUN: %target-typecheck-verify-swift \
|
|
// RUN: -enable-experimental-feature MoveOnlyClasses
|
|
|
|
class KlassModern: ~Copyable {}
|
|
|
|
class Konditional<T: ~Copyable> {}
|
|
|
|
func checks<T: ~Copyable, C>(
|
|
_ b: KlassModern, // expected-error {{parameter of noncopyable type 'KlassModern' must specify ownership}} // expected-note 3{{add}}
|
|
_ c: Konditional<T>,
|
|
_ d: Konditional<C>) {}
|