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: [email protected]
Reporter: [email protected]
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;
}
---
--