Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
std.traits: Adapt unittest to pass with
-preview=in
(#7609)
* std.traits: Use delegates within some __traits(compiles) check to avoid constfold With the new -preview=in check, the const-folding seems to be a bit too aggressive when an rvalue is passed, meaning that the check might fail (probably due to the code that initialize the temporary). To avoid this issue, we simply wrap the assignment in a lambda that will not be called, as there is no downside to that change. * std.traits: Adapt unittest to pass with `-preview=in`
- Loading branch information