[Issue 22249] New: std.experimental.checkedint: Warn.onLowerBound does not compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 29 16:39:40 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22249
Issue ID: 22249
Summary: std.experimental.checkedint: Warn.onLowerBound does
not compile
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: snarwin+bugzilla at gmail.com
As of Phobos 2.097.2, attempting to compile any program that uses
`std.experimental.checkedint.Warn.onLowerBound` fails, with the following
error:
---
/usr/include/dmd/phobos/std/experimental/checkedint.d(1619): Error: undefined
identifier `Lhs`, did you mean alias `Rhs`?
/usr/include/dmd/phobos/std/experimental/checkedint.d(1279): Error: template
instance `std.experimental.checkedint.Warn.onLowerBound!(int, byte)` error
instantiating
---
Example program:
---
import std.experimental.checkedint;
byte foo(byte a, byte b) {
auto c = a.checked;
c += b;
return c.get;
}
---
--
More information about the Digitalmars-d-bugs
mailing list