[Issue 12643] New: @nogc std.range.dropOne

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Apr 25 04:10:53 PDT 2014


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

          Issue ID: 12643
           Summary: @nogc std.range.dropOne
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: Phobos
          Assignee: nobody at puremagic.com
          Reporter: bearophile_hugs at eml.cc

This is borderline between bug report and enhancement request.
Perhaps this should compile:


void main() @nogc {
    import std.range: dropOne;
    auto a1 = [1, 2];
    auto a2 = a1.dropOne;
    auto s1 = "hello";
    auto s2 = s1.dropOne;
}


DMD 2.066alpha gives:

test.d(4,17): Error: @nogc function 'D main' cannot call non- at nogc function
'std.range.dropOne!(int[]).dropOne'
test.d(6,17): Error: @nogc function 'D main' cannot call non- at nogc function
'std.range.dropOne!string.dropOne'

--


More information about the Digitalmars-d-bugs mailing list