Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeAlias syntax missing a TypeParamBounds #1032

Closed
GilRtr opened this issue May 27, 2021 · 1 comment · Fixed by #1036
Closed

TypeAlias syntax missing a TypeParamBounds #1032

GilRtr opened this issue May 27, 2021 · 1 comment · Fixed by #1036
Labels
A-grammar Area: Syntax and parsing

Comments

@GilRtr
Copy link
Contributor

GilRtr commented May 27, 2021

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

@GilRtr GilRtr changed the title TypeAlias syntax missing a TypeParamBound TypeAlias syntax missing a TypeParamBound May 27, 2021
@GilRtr GilRtr changed the title TypeAlias syntax missing a TypeParamBound TypeAlias syntax missing a TypeParamBounds May 27, 2021
@ehuss
Copy link
Contributor

ehuss commented May 27, 2021

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?

@ehuss ehuss added the A-grammar Area: Syntax and parsing label May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: Syntax and parsing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants