Files
swift-mirror/test/TBD/specialize_verify.swift
Xi Ge 435d13496e AST: making export: true in @_specialized attribute a no-operation
The client code doesn't actually call into these specialized functions even
though they have public linkage. This could lead to TBD verification failure
shown in rdar://44777994.

This patch also warns users' codebase when `export: true` is specified.
2020-04-10 16:52:22 -07:00

8 lines
232 B
Swift

// REQUIRES: VENDOR=apple
// RUN: %target-swift-frontend -emit-ir -o/dev/null -O -module-name test -validate-tbd-against-ir=missing %s
@_specialize(exported: true, where T: _Trivial)
public func foo<T>(_ x : T) -> T {
return x
}