https://issues.dlang.org/show_bug.cgi?id=24803
Issue ID: 24803
Summary: __traits(location) is inconsistent with modules
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P3
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
It's not allowed for modules listed on the command line, but for imported
modules it returns the filename of the module it's called from.
```
import core.stdc.stdio;
void main()
{
// Error: can only get the location of a symbol, not `onlineapp`
__traits(getLocation, __traits(parent, main));
// Error: `AliasSeq!("onlineapp.d", 1, 8)` has no effect
__traits(getLocation, core.stdc.stdio);
}
```
--