[Issue 22338] New: Parser rejects basic types in UDAs
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 28 01:14:14 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22338
Issue ID: 22338
Summary: Parser rejects basic types in UDAs
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: major
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: pro.mathias.lang at gmail.com
```
@string @int
void main () {}
```
Returns:
```
onlineapp.d(1,10): Error: `@identifier` or `@(ArgumentList)` expected, not
`@int`
onlineapp.d(2,1): Error: no identifier for declarator `int`
dmd failed with exit code 1.
```
However the following compiles just fine:
```
alias SillyParser = int;
@string @SillyParser
void main ()
{
}
```
Tested with DMD v2.097.2
--
More information about the Digitalmars-d-bugs
mailing list