Bug 18834 – Use ConditionalExpression instead of AssignExpression in TemplateArgument
Status
RESOLVED
Resolution
INVALID
Severity
trivial
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-05-06T13:36:20Z
Last change time
2018-05-06T15:17:19Z
Assigned to
No Owner
Creator
Richard Cattermole
Comments
Comment #0 by alphaglosined — 2018-05-06T13:36:20Z
Current grammar suggests that assignments are valid as part of template initiations.
I.e.
```
func!(x=6);
```
This is because of the usage of AssignExpression inside of TemplateArgument.
AssignExpression refers to ConditionalExpression for both sides. We should consider and probably use it instead.