Skip to content

Check: Cyclic type parameter bounds #874

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

Type parameters can be bounded by another type parameter. This can lead to cycles:

class C<T1, T2> where {
    T1 sub T2,
    T2 sub T1
}

Desired solution

Detect such cycles and show an error.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

Labels

releasedIncluded in a releasevalidation ✔️Improved or new static checks

Type

No type

Projects

Status

✔️ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions