Issue 12948 - @safe std.algorithm.sort().release
Summary: @safe std.algorithm.sort().release
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: safe
Depends on:
Blocks:
 
Reported: 2014-06-19 14:33 UTC by bearophile_hugs
Modified: 2016-06-08 04:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2014-06-19 14:33:21 UTC
void main() @safe {
    import std.algorithm;
    auto r = [1].sort().release;
}


dmd 2.066alpha gives:

temp.d(3): Error: safe function 'D main' cannot call system function 'std.range.SortedRange!(int[],
"a < b").SortedRange.release'
Comment 1 Walter Bright 2016-06-08 04:56:52 UTC
Works with the current compiler.