Files
swift-mirror/validation-test/IDE/crashers_2_fixed/rdar56834798.swift
Rintaro Ishizaki 4ced714e25 [CodeCompletion] Allow type variable in MakeAbstractConformanceForGenericType
When typesSatisfyConstraint() is called with 'openArchetypes=true',
archetypes are substituted with type variables. If they have
conformances, they used to hit assertion in
'MakeAbstractConformanceForGenericType::operator()'.

Adjust the assetion to accept 'TypeVariableType'.

rdar://problem/56834798
2020-01-09 23:18:27 -08:00

24 lines
456 B
Swift

// RUN: %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
// RUN: %target-swift-ide-test -code-completion -code-completion-token=B -source-filename=%s
protocol Proto {}
struct S<T: Proto> {
typealias Value = T
func test(arg: Int) -> Value {
return #^A^#
}
}
class C: Proto {
init() {}
}
extension Proto {
typealias Nested = C
}
func receiver<T: Proto>(arg: T) {}
func test() {
receiver(arg: .#^B^#)
}