Files
swift-mirror/test/SILOptimizer/rdar125460667.swift
Slava Pestov e7131cfbe2 Sema: Fix existential-metatype-to-Any conversion
We were incorrectly unwrapping too many levels of metatype, and
our ErasureExpr would end up with conformances for the instance
type and not the metatype itself.

In the old universe, this was not a problem, but now Any has two
protocol conformance members, so suddently this violated invariants.

This was a regression, introduced in 6027bf46a6.

Fixes rdar://125460667.
2024-04-01 23:05:22 -04:00

10 lines
136 B
Swift

// RUN: %target-swift-frontend -emit-sil %s
@_transparent func f(a: Any.Type) -> Any {
return a
}
func g(a: Any.Type) {
f(a: a)
}