Files
swift-mirror/test/Generics/rdar48049725.swift
Doug Gregor af335c6bb9 [GSB] Consistently use nested type name match constraints.
We generated a mix of "inferred" and "nested type name match"
constraints for the case where we had two nested types with the same
name and inferred that they are equal. Make them consistent by always
using nested type name match constraints. This fixes a bug where we
would get different canonical generic signatures in different source
files because we inferred the same-type constraint with different
requirement sources.

Fixes rdar://problem/48049725.
2019-02-14 14:28:43 -08:00

17 lines
391 B
Swift

// RUN: %target-swift-frontend -primary-file %s -emit-ir %S/Inputs/rdar48049725_other.swift | %FileCheck %s
public protocol P3 {
associatedtype A1: SomeClass
}
public protocol P2 {
associatedtype A2: P3
}
func test<T: P5>(value: T) {
// Ensure that we get the right generic signature for Foo.f
// CHECK: call swiftcc void @"$s12rdar480497253FooV1fyyxAA2P5RzlFZ"
Foo.f(value)
}