Update dmd.reflocal.dd to include auto ref (#16772)

This commit is contained in:
Quirin F. Schroll 2024-08-11 12:59:07 +02:00 committed by GitHub
parent c24631b2d4
commit 8dabb67ee5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
`ref` can now be applied to local, static, extern, and global variables
`ref` and `auto ref` can now be applied to local, static, extern, and global variables
For example, one can now write:
```
@ -10,5 +10,10 @@ void main()
ref int r = s.a;
r = 3;
assert(s.a == 3);
auto ref x = 0;
auto ref y = x;
static assert(!__traits(isRef, x));
static assert( __traits(isRef, y));
}
```