Skip to content

Commit 9a1d55a

Browse files
committed
NCGenerics: add test for feature flag
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 (cherry picked from commit 7799c4a)
1 parent 005b94d commit 9a1d55a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: split-file %s %t
3+
4+
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %t/Library.swift -module-name Library
5+
// RUN: rm -f %t/Library.swiftmodule
6+
// RUN: %target-swift-frontend -I %t -typecheck -verify %t/test.swift
7+
8+
9+
//--- Library.swift
10+
11+
public struct Hello<T: ~Copyable> {
12+
public init() {}
13+
}
14+
15+
//--- test.swift
16+
import Library
17+
18+
struct NC: ~Copyable {}
19+
20+
let x: Hello<NC> = .init()

0 commit comments

Comments
 (0)