www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18102] New: Filename accepted as UDA

https://issues.dlang.org/show_bug.cgi?id=18102

          Issue ID: 18102
           Summary: Filename accepted as UDA
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: johanengelen weka.io

Testcase:
```
// File: uda_bug.d
 uda_bug void foo() {}
```

`dmd -c -o- uda_bug.d` should compile with an error but doesn't. Somehow the
filename can be used as an UDA.

I could not find this in the spec, it's an accepts-invalid bug?

--
Dec 18 2017