August 24, 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@puremagic.com
          Reporter: pro.mathias.lang@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.

--