Bug 17144 – [REG 2.071] local imports became invisible
Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-02-04T11:57:23Z
Last change time
2018-05-17T04:01:12Z
Keywords
industry
Assigned to
No Owner
Creator
anonymous4
Comments
Comment #0 by dfj1esp02 — 2017-02-04T11:57:23Z
struct A
{
import core.stdc.stdio;
}
void f()
{
A.puts("a");
}
Should give deprecation instead of an error.
Comment #1 by bugzilla — 2017-04-12T07:26:15Z
You can use:
-transition=import
to enable the old behavior. This is as designed.
Comment #2 by dfj1esp02 — 2017-05-25T08:58:07Z
*** Issue 17433 has been marked as a duplicate of this issue. ***
Comment #3 by mihails.strasuns.contractor — 2017-05-25T09:05:09Z
Please reconsider - you have explicitly promised that it will keep working in NG (see the linked duplicate issue).
Comment #4 by mihails.strasuns.contractor — 2017-05-25T09:05:52Z
(Note that it stopped working for `public import` too)
Comment #5 by dfj1esp02 — 2017-05-25T09:20:02Z
Hmm... maybe your issue should be reopened instead, because of public.
Comment #6 by bugzilla — 2018-05-17T04:01:12Z
It compiles with -transition=import. That's what is needed to enable the old behavior.
> explicitly promised
https://digitalmars.com/d/archives/digitalmars/D/Nested_public_imports_-_bug_or_feature_269863.html#N270339
"Since the import is qualified with 'public', I see no reason to change this
behavior."
That isn't exactly a promise. And I was later convinced with reasons. But still the old behavior is maintained with the switch.