digitalmars.D.bugs - [Issue 12643] New: nogc std.range.dropOne
- via Digitalmars-d-bugs (29/29) Apr 25 2014 https://issues.dlang.org/show_bug.cgi?id=12643
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 puremagic.com Reporter: bearophile_hugs 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- nogc function 'std.range.dropOne!(int[]).dropOne' test.d(6,17): Error: nogc function 'D main' cannot call non- nogc function 'std.range.dropOne!string.dropOne' --
Apr 25 2014