Commit graph

3 commits

Author SHA1 Message Date
Dennis
9b94878c85
Make safe error messages consistent (#20654)
Co-authored-by: Dennis Korpel <dennis@sarc.nl>
2025-01-08 13:46:38 +08:00
Nick Treleaven
bed5228567 Add supplemental messages to explain unsafe casts
Change msg parameter to use `ref`.
Add test for existing extern(C++) interface cast error.
Add test for class qualifier cast in @safe code.
Add test for casting with opaque array element type.
2024-06-14 02:57:58 +02:00
Nick Treleaven
e60bfd11bd
Fix Bugzilla 24434 - Casting away const with cast() is not a @safe lv… (#16315)
* Fix Bugzilla 24434 - Casting away const with cast() is not a @safe lvalue

* Use `pointerTo`

* Use cast to hide lvalue append error

* Fix unsafe shared increment

* Use setUnsafePreview

* Add test for lvalue assign

* Fix qualifier cast check

* Workaround for safe append

Fixes Bugzilla 23530 - casting immutable away allowed in safe.

* Update header

* Trigger tests
2024-04-28 22:44:48 +08:00