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

unit_threaded.property.check bypasses @safe #176

Closed
Geod24 opened this issue Mar 27, 2020 · 1 comment
Closed

unit_threaded.property.check bypasses @safe #176

Geod24 opened this issue Mar 27, 2020 · 1 comment
Labels

Comments

@Geod24
Copy link
Contributor

Geod24 commented Mar 27, 2020

Because check and relative take an alias to a function but are marked as @trusted, they essentially pretend to be @safe without actually enforcing the @safe guarantees.

import unit_threaded.property;

@safe unittest
{
    int* ptr;
    check!((int a) { *(ptr + 256) = 42; return a % 2 == 0; });
}
@atilaneves
Copy link
Owner

Oops.

@atilaneves atilaneves added the bug label Mar 27, 2020
atilaneves added a commit that referenced this issue Mar 27, 2020
Fix #176 - check is no longer falsely trusted
atilaneves added a commit that referenced this issue Mar 30, 2020
atilaneves added a commit that referenced this issue Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants