Skip to content

Change non-function type aliases tests: get rid of references from a type alias to itself.  #498

@iarkh

Description

@iarkh

Many of non-function type aliases tests have a reference from a type alias to itself.

The specification says that any self reference in a type alias is a compile-time error, and the use of A<X> as a bound in the declaration of A is such a self reference.

So the tests should be modified to avoid the self reference by using a related type.

In the cases where these declarations reflect a computation of an instantiation to bound the computed result can still be reused: We just need to have a class (where self references are OK!), and that class should have the same bounds that the type alias currently declares.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions