Skip to content

Commit 683fbc7

Browse files
committed
Change how preview=in is detected
This is a minor internal change, but will allow us to deprecate in ref at the parser level.
1 parent 6d647c5 commit 683fbc7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

std/format/internal/write.d

+2-1
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,8 @@ enum HasToStringResult
18291829
customPutWriterFormatSpec,
18301830
}
18311831

1832-
private enum hasPreviewIn = !is(typeof(mixin(q{(in ref int a) => a})));
1832+
private alias DScannerBug895 = int[256];
1833+
private immutable bool hasPreviewIn = ((in DScannerBug895 a) { return __traits(isRef, a); })(DScannerBug895.init);
18331834

18341835
template hasToString(T, Char)
18351836
{

0 commit comments

Comments
 (0)