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

shouldThrowWithMessage fails with DIP1008 and the nogc package #157

Closed
atilaneves opened this issue Jul 23, 2019 · 1 comment
Closed

shouldThrowWithMessage fails with DIP1008 and the nogc package #157

atilaneves opened this issue Jul 23, 2019 · 1 comment

Comments

@atilaneves
Copy link
Owner

atilaneves commented Jul 23, 2019

unittest {
    import unit_threaded: shouldThrowWithMessage;
    fun.shouldThrowWithMessage("why hello there");
}


void fun() {
    import nogc: enforce;
    enforce(false, "why hello there");
}

void main() {}
@atilaneves atilaneves changed the title shouldThrowWithMessage fails with DIP1008 shouldThrowWithMessage fails with DIP1008 and the nogc package Jul 23, 2019
@atilaneves
Copy link
Owner Author

The problem that it's not @safe to be able to access the msg from the super class because of lifetime reasons. The fix is to make sure to use NoGcException when catching but that reveals a new bug.

atilaneves added a commit that referenced this issue Jul 23, 2019
atilaneves added a commit that referenced this issue Jul 23, 2019
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

No branches or pull requests

1 participant