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

Branch replace-libdparse: Exclude argument body of __traits(compiles #159

Open
nordlow opened this issue Oct 17, 2024 · 1 comment
Open

Comments

@nordlow
Copy link
Contributor

nordlow commented Oct 17, 2024

For instance

assert(!__traits(compiles, { auto _ = f(); }))

gives

Variable _ is never modified and could have been declared const or immutable.

. The developer might be interested in testing for such properties so analysis in __traits(compiles should be excluded.

@nordlow
Copy link
Contributor Author

nordlow commented Oct 17, 2024

On second thought, I'm not sure this particular diagnostics should be excluded in __traits(compiles, ...) or not. But there might be other code constructs BODY that shouldn't be excluded __traits(compiles, BODY).

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