www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15503] New: Namespace lookup not following scoping rules

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

          Issue ID: 15503
           Summary: Namespace lookup not following scoping rules
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

The following should work, according to the scoping rules:

-----------x.d------------
import y;

//struct ns
extern (C++, ns)
{
class X { y.ns.Y a; }
}

----------y.d------------
import x;

//struct ns
extern (C++, ns)
{
class Y { x.ns.X b; }
}

It does work if the struct is used.

--
Jan 02