Skip to content

std.math.algebraic: Inure against integer promotion rules in abs()#7978

Closed
ibuclaw wants to merge 1 commit intodlang:masterfrom
ibuclaw:math/abs
Closed

std.math.algebraic: Inure against integer promotion rules in abs()#7978
ibuclaw wants to merge 1 commit intodlang:masterfrom
ibuclaw:math/abs

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Apr 17, 2021

Fixes something that got missed out by #5653. FYI @WalterBright.

std/math/algebraic.d(50): Deprecation: integral promotion not done for `-cast(ushort)0u`, use '-preview=intpromote' switch or `-cast(int)(cast(ushort)0u)`
std/math/algebraic.d(59): Deprecation: integral promotion not done for `-x`, use '-preview=intpromote' switch or `-cast(int)(x)`
std/math/algebraic.d(50): Deprecation: integral promotion not done for `-cast(ubyte)0u`, use '-preview=intpromote' switch or `-cast(int)(cast(ubyte)0u)`
std/math/algebraic.d(59): Deprecation: integral promotion not done for `-x`, use '-preview=intpromote' switch or `-cast(int)(x)`
std/math/algebraic.d(50): Deprecation: integral promotion not done for `-cast(ubyte)0u`, use '-preview=intpromote' switch or `-cast(int)(cast(ubyte)0u)`
std/math/algebraic.d(59): Deprecation: integral promotion not done for `-x`, use '-preview=intpromote' switch or `-cast(int)(x)`

@ibuclaw ibuclaw added the math label Apr 17, 2021
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#7978"

@ibuclaw ibuclaw changed the title std.math.algebraic: Inure against integer promotion rules std.math.algebraic: Inure against integer promotion rules in abs() Apr 17, 2021
@ibuclaw ibuclaw force-pushed the math/abs branch 2 times, most recently from 94bc97a to 6d46239 Compare April 17, 2021 14:03
@ibuclaw
Copy link
Member Author

ibuclaw commented Apr 17, 2021

Actually, I'll fix this by having an internal absu function in std.numeric.

@ibuclaw ibuclaw closed this Apr 17, 2021
@ibuclaw ibuclaw deleted the math/abs branch April 17, 2021 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants