Why do immutable variables need reference counting?
H. S. Teoh
hsteoh at quickfur.ath.cx
Sun Apr 17 13:27:04 UTC 2022
On Sun, Apr 17, 2022 at 01:06:36PM +0000, wjoe via Digitalmars-d-learn wrote:
[...]
> On the matter of undefined behavior. Technically a program is in
> undefined behavior land after throwing an error, thus every unittest
> that continues after assertThrown is therefore nonsense code, is it
> not ?
The spec explicitly makes an exception(!) in this case. See 10.24.11.3:
https://dlang.org/spec/expression.html#assert_expressions
as well as 27.3:
https://dlang.org/spec/unittest.html
T
--
An elephant: A mouse built to government specifications. -- Robert Heinlein
More information about the Digitalmars-d-learn
mailing list