Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue 18349 - std/math.d(543,33): Deprecation: integral promotion not done for -x #6135

Merged
merged 2 commits into from Feb 7, 2018
Merged

Conversation

ghost
Copy link

@ghost ghost commented Feb 7, 2018

last fix was incomplete. abs didn't handle type constructors yet.

@ghost ghost requested review from ibuclaw and dnadlinger as code owners February 7, 2018 09:11
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @bbasile! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.

Some tips to help speed things up:

  • smaller, focused PRs are easier to review than big ones

  • try not to mix up refactoring or style changes with bug fixes or feature enhancements

  • provide helpful commit messages explaining the rationale behind each change

Bear in mind that large or tricky changes may require multiple rounds of review and revision.

Please see CONTRIBUTING.md for more information.

Bugzilla references

Auto-close Bugzilla Description
18349 std/math.d(543,33): Deprecation: integral promotion not done for -x

Copy link
Member

@ibuclaw ibuclaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable

std/math.d Outdated
{
static if (isFloatingPoint!(Num))
return fabs(x);
else
{
static if (is(Num == short) || is(Num == byte))
static if (is(Num : const(short)) || is(Num : const(byte)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this isn't the same. ubyte, char, wchar, etc. are going to pass these.

I suggest is(Unqual!Num == short)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, done.

@dlang-bot dlang-bot merged commit 9087e47 into dlang:master Feb 7, 2018
@ghost ghost deleted the issue-18349 branch April 23, 2018 13:35
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.

4 participants