mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Ensure that when using noncopyable generics when building a module, the compiler can re-ingest it and will pick the part guarded by $NoncopyableGenerics. verifies the concern in rdar://127701059
21 lines
437 B
Swift
21 lines
437 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
|
|
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %t/Library.swift -module-name Library
|
|
// RUN: rm -f %t/Library.swiftmodule
|
|
// RUN: %target-swift-frontend -I %t -typecheck -verify %t/test.swift
|
|
|
|
|
|
//--- Library.swift
|
|
|
|
public struct Hello<T: ~Copyable> {
|
|
public init() {}
|
|
}
|
|
|
|
//--- test.swift
|
|
import Library
|
|
|
|
struct NC: ~Copyable {}
|
|
|
|
let x: Hello<NC> = .init()
|