[Issue 18780] New: Inconsistent behavior with Variant holding int converting to unsigned types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 19 15:10:53 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18780
Issue ID: 18780
Summary: Inconsistent behavior with Variant holding int
converting to unsigned types
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: alex.jercaianu at gmail.com
This code works fine:
int x = 7;
Variant a = x;
assert(a.convertsTo!ulong);
This assert however triggers:
int x = 7;
Variant a = x;
assert(a.convertsTo!uint);
Is this behavior intended?
--
More information about the Digitalmars-d-bugs
mailing list