// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s func markUsed(_ t: T) {} protocol A { associatedtype B func b(_: B) } struct X : A { // CHECK-LABEL: define internal swiftcc void @"$s23dependent_reabstraction1XVyxGAA1AA2aEP1byy1BQzFTW"(ptr noalias nocapture dereferenceable({{.*}}) %0, ptr noalias nocapture swiftself %1, ptr %Self, ptr %SelfWitnessTable) func b(_ b: X.Type) { let x: Any = b markUsed(b as X.Type) } } func foo(_ x: T, _ y: T.B) { x.b(y) } let a = X() let b = X() foo(a, X.self) foo(b, X.self)