[Issue 19189] New: Accessing private template member allowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 25 15:00:22 UTC 2018


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

          Issue ID: 19189
           Summary: Accessing private template member allowed
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: yshuiv7 at gmail.com

Example:

    template A(T) {
        private enum A = T.sizeof;
    }
    template B(T) {
        private enum C = T.sizeof;
    }
    void main() {
        enum x = A!int;
        enum y = B!int.C;
    }

Expected:

    Compilation error (or warning)

Actual:

    No error generated

--


More information about the Digitalmars-d-bugs mailing list