-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #2636: Move last phase period assertion #2952
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
Conversation
) | ||
|
||
private def checkedIdOverflow(phase: Phase): Phase = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
) | ||
|
||
private def checkedIdOverflow(phase: Phase): Phase = { | ||
assert(phase.id <= Periods.MaxPossiblePhaseId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this ever fail? Phase.id extracts it from the period inside the phase, i.e. it reads a field which you're supposedly testing for overflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to do the test in Phase.init instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it will ever fail, but that was the check that was there before. Probably at some point this was failing.
@DarkDimius merged contents of both PRs |
No description provided.