Skip to content

TypeAlias syntax missing a TypeParamBounds #1032

Closed

Description

@GilRtr

this is valid syntactically:

type TypeAlias: TraitBound = SomeType;

however it is not part of the reference.

expectation:

Syntax
TypeAlias :
   type IDENTIFIER GenericParams? ( : TypeParamBounds )? WhereClause? ( = Type )? ;

*should be stated that this syntax is only useful in the context of an associated type and will yield bounds on `type`s in this context have no effect anywhere else.

edit: I accidently pressed enter before writing the description

Activity

  1. changed the title [-]TypeAlias syntax missing a TypeParamBound [/-] [+]`TypeAlias` syntax missing a `TypeParamBound`[/+] on May 27, 2021
  2. changed the title [-]`TypeAlias` syntax missing a `TypeParamBound`[/-] [+]`TypeAlias` syntax missing a `TypeParamBounds`[/+] on May 27, 2021
  3. ehuss commented on May 27, 2021

    @ehuss
    Contributor

    Thanks for the eagle eye! Looks like I missed this as part of the grand parser unification (#927). Would you be willing to open a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-grammarArea: Syntax and parsing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions