Skip to content

Commit

Permalink
[spec] Add grammar for (Type)(args)
Browse files Browse the repository at this point in the history
Change introduced in dlang/dmd#15377.

Fixes Bugzilla 24520 - type(value) got a synonym (type)(value)

Also combine 2 other PrimaryExpression rules with `TypeCtor? (Type).Identifier`.
  • Loading branch information
ntrel committed Apr 29, 2024
1 parent f84b92c commit d9eb8e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions spec/expression.dd
Original file line number Diff line number Diff line change
Expand Up @@ -1861,11 +1861,10 @@ $(GNAME PrimaryExpression):
$(GLINK ImportExpression)
$(GLINK NewExpression)
$(GLINK2 type, FundamentalType) $(D .) $(IDENTIFIER)
$(D $(LPAREN)) $(GLINK2 type, Type) $(D $(RPAREN) .) $(IDENTIFIER)
$(GLINK2 type, TypeCtor)$(OPT) $(D $(LPAREN)) $(GLINK2 type, Type) $(D $(RPAREN) .) $(IDENTIFIER)
$(D $(LPAREN)) $(GLINK2 type, Type) $(D $(RPAREN) .) $(GLINK2 template, TemplateInstance)
$(GLINK2 type, FundamentalType) $(D $(LPAREN)) $(GLINK NamedArgumentList)$(OPT) $(D $(RPAREN))
$(GLINK2 type, TypeCtor) $(D $(LPAREN)) $(GLINK2 type, Type) $(D $(RPAREN)) $(D .) $(IDENTIFIER)
$(GLINK2 type, TypeCtor) $(D $(LPAREN)) $(GLINK2 type, Type) $(D $(RPAREN)) $(D $(LPAREN)) $(GLINK NamedArgumentList)$(OPT) $(D $(RPAREN))
$(GLINK2 type, TypeCtor)$(OPT) $(D $(LPAREN)) $(GLINK2 type, Type) $(D $(RPAREN)) $(D $(LPAREN)) $(GLINK NamedArgumentList)$(OPT) $(D $(RPAREN))
$(GLINK2 type, Typeof)
$(GLINK TypeidExpression)
$(GLINK IsExpression)
Expand Down

0 comments on commit d9eb8e8

Please sign in to comment.