[Issue 20164] New: Importing deprecated module at function-local scope does not output diagnostic message

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 24 22:54:32 UTC 2019


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

          Issue ID: 20164
           Summary: Importing deprecated module at function-local scope
                    does not output diagnostic message
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: pro.mathias.lang at gmail.com

```
--- mod1.d
module mod1;
void main() { import mod2; }
--- mod2.d
deprecated module mod2;
```


This does not output any message. Move the import outside of the function and
it correctly does output a message.

--


More information about the Digitalmars-d-bugs mailing list