[Issue 16294] New: import treated as public import

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jul 18 17:59:25 PDT 2016


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

          Issue ID: 16294
           Summary: import treated as public import
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: timothee.cour2 at gmail.com

This is inconsistent:
version(with_import)
should not affect visibility of symbol bar, given that we have 'import test3'
but not 'public import test3'


----
dmd -c -o- -version=with_import main.d
ok

dmd -c -o- main.d
test.d(2): Error: module test4 import 'bar' not found

using DMD64 D Compiler v2.071.1
----
main.d:
import test;

test.d:
import test4:bar;

test3.d:
void bar();

test4.d:
version(with_import)
import test3;

--


More information about the Digitalmars-d-bugs mailing list