[Issue 18539] New: approxEqual cannot deduces type if Nullable used
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 28 13:38:08 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18539
Issue ID: 18539
Summary: approxEqual cannot deduces type if Nullable used
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: drug2004 at bk.ru
```
import std.stdio, std.typecons, std.math;
void main()
{
auto foo = nullable(2.0);
auto bar = nullable(2.0);
assert (foo.approxEqual(bar));
}
```
stops compiling since 2.078, workaround is using nullable.get:
```
assert (foo.get.approxEqual(bar.get));
```
--
More information about the Digitalmars-d-bugs
mailing list