Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0100-sr4295.swift
Doug Gregor 52e52b564b [GSB] Improve handling of conformances resolved by concrete types.
Centralize and simplify the handling of conformance requirements
resolved by same-type-to-concrete requirements in a few ways:

* Always store a ProtocolConformanceRef in via-superclass and
  via-concrete requirement sources, so we never lose this information.

* When concretizing a nested type based on its parent, use the
  via-concrete conformance information rather than performing lookup
  again, simplifying this operation considerably and avoiding
  redundant lookups.

* When adding a conformance requirement to a potential archetype that
  is equivalent to a concrete type, attempt to find and record the
  conformance.

Fixes SR-4295 / rdar://problem/31372308.
2017-06-23 09:34:57 -07:00

22 lines
540 B
Swift

// RUN: not %target-swift-frontend -emit-ir -primary-file %s
// REQUIRES: asserts
internal protocol _UTFEncoding {
associatedtype EncodedScalar where EncodedScalar == Int
}
public protocol _UnicodeEncoding {
associatedtype EncodedScalar : BidirectionalCollection
}
public protocol _UnicodeEncoding_ {
associatedtype ForwardParser: _UnicodeEncoding
}
public protocol UnicodeEncoding: _UnicodeEncoding_ where ForwardParser == Self {}
public protocol _UTFParser {
associatedtype Encoding: UnicodeEncoding, _UTFEncoding
}