Bug 2893 – Type const(int) does not have an Unsigned counterpart
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2009-04-25T01:15:00Z
Last change time
2015-06-09T01:26:26Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
someanon
Comments
Comment #0 by someanon — 2009-04-25T01:15:52Z
$ cat tos.d
import std.conv;
void f() {
const int i;
to!string(i);
}
$ dmd -c tos.d
/dmd/linux/bin/../../src/phobos/std/traits.d(1011): Error: static assert "Type const(int) does not have an Unsigned counterpart"
/dmd/linux/bin/../../src/phobos/std/traits.d(2454): Error: template instance std.traits.Unsigned!(const(int)) error instantiating
/dmd/linux/bin/../../src/phobos/std/conv.d(2454): Error: Unsigned!(const(int)) is used as a type