Skip to content

Failed to produce diagnostic for associatedtype reference on existential base #83975

@hamishknight

Description

@hamishknight

The following fails to produce the correct diagnostic:

protocol P {
  associatedtype X
}

func foo(_ x: any P) {
  _ = x.X // error: failed to produce diagnostic for expression; please submit a bug report
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of Implementationtype checkerArea → compiler: Semantic analysis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions