D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17144 - [REG 2.071] local imports became invisible
Summary: [REG 2.071] local imports became invisible
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: industry
: 17433 (view as issue list)
Depends on:
Blocks:
 
Reported: 2017-02-04 11:57 UTC by anonymous4
Modified: 2018-05-17 04:01 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description anonymous4 2017-02-04 11:57:23 UTC
struct A
{
  import core.stdc.stdio;
}

void f()
{
  A.puts("a");
}

Should give deprecation instead of an error.
Comment 1 Walter Bright 2017-04-12 07:26:15 UTC
You can use:

   -transition=import

to enable the old behavior. This is as designed.
Comment 2 anonymous4 2017-05-25 08:58:07 UTC
*** Issue 17433 has been marked as a duplicate of this issue. ***
Comment 3 Mihails Strasuns 2017-05-25 09:05:09 UTC
Please reconsider - you have explicitly promised that it will keep working in NG (see the linked duplicate issue).
Comment 4 Mihails Strasuns 2017-05-25 09:05:52 UTC
(Note that it stopped working for `public import` too)
Comment 5 anonymous4 2017-05-25 09:20:02 UTC
Hmm... maybe your issue should be reopened instead, because of public.
Comment 6 Walter Bright 2018-05-17 04:01:12 UTC
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.