Open dabrahams opened 3 months ago
The invalid print is caused by a bug in the detection of trivially deinitializable types. deinit
is ignored because the compiler thinks there's no part of X
that needs to run a deinitializer.
The missing error is seemingly because of a bug in access checking that lets us consume through an access that has a live let binding. The logic is actually rather complex and this bug report makes me think we should perhaps revisit the idea that consumption through let
is ever allowed.
I don't know why this compiles. I also don't know why it prints 0 instead of -1.