Bug 15244 – Misleading compiler warning: "Error: use .min_normal property instead of .min"

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-10-24T22:16:50Z
Last change time
2020-03-21T03:56:42Z
Assigned to
No Owner
Creator
Ali Cehreli

Comments

Comment #0 by acehreli — 2015-10-24T22:16:50Z
void main() { double.min; } Error: use .min_normal property instead of .min I like the warning but it is misleading. When a person (especially a beginner) writes double.min, they mean "the minimum value" but the warning tells them to use something else: double.min_normal. I recommend that the message be changed to something like Error: .min is deprecated for floating point types. Do you mean -double.max or double.min_normal? Ali
Comment #1 by bugzilla — 2018-12-02T02:56:06Z
This currently produces the message: test.d(3): Error: no property `min` for type `double` Not sure when or why it was changed.
Comment #2 by b2.temp — 2019-02-14T06:44:09Z