Skip to content

Deprecate using unit denominations in combination with hex numbers.#3628

Merged
chriseth merged 2 commits intodevelopfrom
literalsHexUnit
Mar 2, 2018
Merged

Deprecate using unit denominations in combination with hex numbers.#3628
chriseth merged 2 commits intodevelopfrom
literalsHexUnit

Conversation

@ekpyron
Copy link
Collaborator

@ekpyron ekpyron commented Mar 1, 2018

No description provided.

@ekpyron ekpyron requested a review from chriseth March 1, 2018 16:01
if (v050)
m_errorReporter.fatalTypeError(
_literal.location(),
"Hexadecimal numbers cannot be used with unit denominations."
Copy link
Contributor

Choose a reason for hiding this comment

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

We could suggest to use 0x1234 * 1 day if they really mean it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please include that to avoid user complaints 😉

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, see commit 454b470.

Copy link
Contributor

@chriseth chriseth left a comment

Choose a reason for hiding this comment

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

Fine either way.

@chriseth chriseth merged commit f78d6a9 into develop Mar 2, 2018
m_errorReporter.fatalTypeError(
_literal.location(),
"Hexadecimal numbers cannot be used with unit denominations. "
"You can use an expression of the form '0x1234 * 1 day' instead."
Copy link
Contributor

Choose a reason for hiding this comment

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

Just as a note, usually we've used double quotes for all these, i.e. form \"0x1234 * 1 day\" instead

Copy link
Contributor

Choose a reason for hiding this comment

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

@ekpyron can you please make this small change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments