https://issues.dlang.org/show_bug.cgi?id=12656
Issue ID: 12656
Summary: Some functions in std.ascii can be @nogc
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: enhancement
Priority: P1
Component: Phobos
Assignee: [email protected]
Reporter: [email protected]
void main() @nogc {
import std.ascii: toLower, toUpper, isLower, isUpper;
auto c1 = toUpper('a');
auto c2 = toLower('A');
auto b1 = isLower('a');
auto b2 = isUpper('A');
}
DMD 2.066alpha gives:
test.d(3,22): Error: @nogc function 'D main' cannot call non-@nogc function
'std.ascii.toUpper!char.toUpper'
test.d(4,22): Error: @nogc function 'D main' cannot call non-@nogc function
'std.ascii.toLower!char.toLower'
test.d(5,22): Error: @nogc function 'D main' cannot call non-@nogc function
'std.ascii.isLower'
test.d(6,22): Error: @nogc function 'D main' cannot call non-@nogc function
'std.ascii.isUpper'
--