Files
swift-mirror/test/ModuleInterface/noncopyable_generics_feature_flag.swift
Kavon Farvardin ad1375ee7e 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
2024-05-13 10:43:25 -07:00

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()