https://issues.dlang.org/show_bug.cgi?id=15244

          Issue ID: 15244
           Summary: Misleading compiler warning: "Error: use .min_normal
                    property instead of .min"
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nob...@puremagic.com
          Reporter: acehr...@yahoo.com

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

--

Reply via email to