/Users/timothee/homebrew/opt/dmd/include/dlang/dmd/std/math.d(543,33): Deprecation: integral promotion not done for -x, use '-transition=intpromote' switch or -cast(int)(x) dub run dfmt -- -h Building package dfmt in /Users/timothee/.dub/packages/dfmt-0.5.0/dfmt/ Fetching libdparse 0.7.1 (getting selected version)... Performing "debug" build using dmd for x86_64. libdparse 0.7.1: building configuration "library"... dfmt 0.5.0: building configuration "application"... /Users/timothee/homebrew/opt/dmd/include/dlang/dmd/std/math.d(543,33): Deprecation: integral promotion not done for -x, use '-transition=intpromote' switch or -cast(int)(x) /Users/timothee/homebrew/opt/dmd/bin/dmd --version DMD64 D Compiler v2.078.1
IIRC: was triggered from dfmt by an input of type `immutable(short)` looks like logic breaks when input is immutable? Num abs(Num)(Num x) @safe pure nothrow if ((is(typeof(Num.init >= 0)) && is(typeof(-Num.init)) || (is(Num == short) || is(Num == byte))) && !(is(Num* : const(ifloat*)) || is(Num* : const(idouble*)) || is(Num* : const(ireal*)))) { static if (isFloatingPoint!(Num)) return fabs(x); else { static if (is(Num == short) || is(Num == byte)) return x >= 0 ? x : cast(Num) -int(x); else return x >= 0 ? x : -x; } }
Yeah nobody seen that "Unqual" is needed during the review. https://github.com/dlang/phobos/pull/5958/files I'm gonna handle this since i feel 50% responsible
The constraint is already commented... https://github.com/dlang/phobos/pull/6014 https://github.com/dlang/phobos/pull/6014/files#diff-8b9f1870415268a4c40b628d596dc405R549 Maybe the fix can be done anyway
pull: https://github.com/dlang/phobos/pull/6135
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/a2ab91ad483a18c277490fe2a6d725054ad39584 fix issue 18349 - std/math.d(543,33): Deprecation: integral promotion not done for -x https://github.com/dlang/phobos/commit/9087e479618a2ad75960569cabfa75ce09255fd7 Merge pull request #6135 from BBasile/issue-18349 fix issue 18349 - std/math.d(543,33): Deprecation: integral promotion not done for -x merged-on-behalf-of: Steven Schveighoffer <schveiguy@users.noreply.github.com>