http://d.puremagic.com/issues/show_bug.cgi?id=8319

           Summary: selective scoped import
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: ellery-newco...@utulsa.edu


--- Comment #0 from Ellery Newcomer <ellery-newco...@utulsa.edu> 2012-06-29 
15:21:41 PDT ---
..doesn't work

for example:

auto z(T)(T x) {
    import std.traits: isPointer;
    static assert(isPointer!T);

    return 1;
}
void main() {
    z(1);
    z("a".ptr);
}


gives me:

test.d(3): Error: template instance isPointer!(int) template 'isPointer' is not
defined
test.d(8): Error: template instance test.z!(int) error instantiating
test.d(3): Error: template instance isPointer!(immutable(char)*) template
'isPointer' is not defined
test.d(9): Error: template instance test.z!(immutable(char)*) error
instantiating


whereas:

auto z(T)(T x) {
    import std.traits;
    static assert(isPointer!T);

    return 1;
}
void main() {
    z(1);
    z("a".ptr);
}

sees isPointer and asserts as expected.

dmd 2.059.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to