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 13390 - Be explicit about non-empty input and fail early #3001

Merged
merged 1 commit into from Mar 1, 2015

Conversation

kuettler
Copy link
Contributor

The regression seems that a late crash (in front, dmd 2.065) became an early crash (in the constructor, dmd 2.066.0). There are several unexciting ways to consider:

  • Fail early, aka assert before construction
  • Fail late, aka assert in each method
  • Cycle dummy data (there are different ways to do that, all are underwhelming)
  • Return an empty range and violate the static condition about cycles

In this light I guess fail early is the best choice. The old behavior might be considered a bug. Then this fix just defines valid input.

@quickfur
Copy link
Member

LGTM. Thanks!

@kuettler kuettler changed the title Fix #13390: Be explicit about non-empty input and fail early Fix Issue 13390 - Be explicit about non-empty input and fail early Feb 25, 2015
@MartinNowak MartinNowak added this to the 2.067 milestone Feb 28, 2015
@MartinNowak
Copy link
Member

Auto-merge toggled on

MartinNowak added a commit that referenced this pull request Mar 1, 2015
Fix Issue 13390 - Be explicit about non-empty input and fail early
@MartinNowak MartinNowak merged commit 4f3c90a into dlang:master Mar 1, 2015
MartinNowak added a commit that referenced this pull request Mar 10, 2015
Fix Issue 13390 - Be explicit about non-empty input and fail early
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants