Files
swift-mirror/test/IRGen/conformance_path_with_concrete_steps.swift
Slava Pestov 5a39c81d8a IRGen: Fix silly mistake in MetadataPath::followComponent()
This fixes a regression from a00157ec43.

My change made it so that sourceKey.Kind was checked after being
overwritten with an abstract conformance, so we would never take
the if statement. Incredibly, it almost worked.

Fixes rdar://problem/148698142.
2025-04-09 11:34:15 -04:00

30 lines
418 B
Swift

// RUN: %target-swift-frontend -emit-ir %s
public protocol P1 {
associatedtype A: P3
}
public protocol P2: P1 where A.B == G<C> {
associatedtype C where C == A.B.C
}
public protocol P3 {
associatedtype B: P4
}
public protocol P4: P5 {}
public protocol P5 {
associatedtype C: P6
}
public protocol P6 {
func foo()
}
public struct G<C: P6>: P4 {}
public func f<T: P2>(_: T, c: T.C) {
return c.foo()
}