UDAs grammar: @<template_instance> valid?
Bruno Medeiros via Digitalmars-d
digitalmars-d at puremagic.com
Wed Oct 29 08:08:27 PDT 2014
On 29/10/2014 13:21, Kenji Hara via Digitalmars-d wrote:
> 2014-10-29 21:33 GMT+09:00 Bruno Medeiros via Digitalmars-d
> <digitalmars-d at puremagic.com <mailto:digitalmars-d at puremagic.com>>:
>
> Someone opened an issue report for a bug in the DDT parser, it
> doesn't parse this:
>
> template X(int Y){}
>
> @X!3 // error here
> void main(){}
>
> And yet DMD accepts this code. Is this grammar supposed to be valid
> though? The grammar spec doesn't allow it, not that means much. I
> searched for an open grammar bug, but couldn't find one.
>
>
> It is a grammar bug, because DMD parser intentionally accepts the syntax.
>
Opened: https://issues.dlang.org/show_bug.cgi?id=13664
--
Bruno Medeiros
https://twitter.com/brunodomedeiros
More information about the Digitalmars-d
mailing list