mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
and implement it for @isolated(any) function types. The existing testing was pretty broken: we were diagnosing all sorts of things that don't require type metadata (like using a tuple with an extended existential in a value position in an API signature) and not diagnosing several things that do (like covariant function conversions that erase types). There's therefore some risk to this patch, but I'm not too worried because needing metadata like this is pretty uncommon, and it's likely that programs won't build correctly anyway --- it'll just get caught by the linker instead of the compiler.
24 lines
376 B
Swift
24 lines
376 B
Swift
// RUN: %target-run-simple-swiftgyb(-Xfrontend -disable-availability-checking)
|
|
|
|
// REQUIRES: executable_test
|
|
|
|
%for N in range(0, 100):
|
|
|
|
protocol P${N}<A, B> {
|
|
associatedtype A
|
|
associatedtype B
|
|
}
|
|
|
|
%end
|
|
|
|
var array : [Any.Type] = [
|
|
%for N in range(0, 100):
|
|
(any P${N}<Int, Float>).self,
|
|
%end
|
|
%for N in range(0, 100):
|
|
(any P${N}<Float, String>).self,
|
|
%end
|
|
]
|
|
|
|
print(array)
|