Skip to content

[SR-15790] Another incorrect requirement signature computation example #58067

@slavapestov

Description

@slavapestov
Previous ID SR-15790
Radar None
Original Reporter @slavapestov
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 83b25146fb7af0fa43beb446686634b5

Issue Description:

This is from reduced from the example in #40812

public protocol P1 {
  associatedtype X: P1 where X.X == X
}

public protocol P2: Collection, P1 where Element: P1, X == Z.Y {
  associatedtype Y: P3
  associatedtype Z: P2
}

public protocol P3: P2 {
  associatedtype T: P2
}

The GSB produces redundant same-type requirements in P2 and P3:

crash4.(file).P2@crash4.swift:5:17
Requirement signature: <Self where Self : Collection, Self : P1, Self.Element : P1, Self.X == Self.Z.Y, Self.Y : P3, Self.Z : P2, Self.Z.Y == Self.X.Z.Y>
crash4.(file).P3@crash4.swift:10:17
Requirement signature: <Self where Self : P2, Self.T : P2, Self.T.X == Self.T.Z.Y.X>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions