mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We go to look at the conforming protocols of an associated type but we haven't built the generic environment for the associated type's protocol yet. In the test case given, we find the conformance later via a different path, so everything continues to work. SubstitutionMap::lookupConformance() is hopefully getting a makeover soon, and this hack will go away. Fixes <rdar://problem/31302713>.
7 lines
288 B
Swift
7 lines
288 B
Swift
// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/protocol-conformance/rdar31302713.swift -module-name animal_snack
|
|
|
|
public struct FunctionalFurryAnimal<Fangs : Animal> : FurryAnimal
|
|
where Fangs.AnimalSnackType.EatWith == Fangs {
|
|
public func bite(with: Fangs) {}
|
|
}
|