Files
swift-mirror/test/multifile/protocol-conformance-rdar31302713.swift
Slava Pestov f10f00d887 Sema: Narrow fix for a circular protocol conformance checking case
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>.
2017-03-30 02:03:52 -07:00

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) {}
}