Commit graph

533 commits

Author SHA1 Message Date
Dennis
6c826179ad
Fix bugzilla 23294 - parameter to parameter assignment leads to incorrect scope inference (#16725) 2024-07-19 15:47:01 +03:00
Dennis
4bee12e00e
escape.d: Remove special case for DelegateExp arg (#16723) 2024-07-19 14:25:55 +03:00
Dennis Korpel
f384dadc55 escape.d: combine return scope and return ref branches 2024-07-19 00:14:34 +02:00
Dennis
96fab42ee5
Fix bugzilla 24663 - dip1000 doesn't check slice expression implicitly converted to static array (#16705) 2024-07-16 16:47:09 +02:00
Dennis
f158c3553e
escape.d: Fix handling of isTypesafeVariadicArray (#16709) 2024-07-16 14:29:57 +03:00
Dennis Korpel
a6f0a845b6 Fix bugzilla 24645 - Hidden static assert error messages if more than 20 errors 2024-07-12 14:04:28 +02:00
Dennis Korpel
458d766cb5 Add note when errors are omitted 2024-07-12 12:58:23 +02:00
Nick Treleaven
9da51ae446 Combine related tests 2024-07-08 13:06:17 +01:00
Nick Treleaven
2da873a631 Fix Bugzilla 23449 - spellchecker should suggest corrections for pointer members 2024-07-08 13:05:30 +01:00
Nick Treleaven
97366596be Fix Bugzilla 9997 - Missed misspell suggestions for UFCS 2024-07-08 12:29:43 +01:00
Johan Engelen
b5130fd880 Fix bugzilla issue 24623 followup.
Rename CppRuntime to _LLVM and _GNU
Also accept c++ for cxx in target string.
2024-06-30 13:45:31 +02:00
Nick Treleaven
be5dd7c25e [trivial] Fix foreach range tuple element error message 2024-06-28 15:59:30 +02:00
Nick Treleaven
74618abad1 Fix Bugzilla 24631 - Pointer cast allows changing @system field in @safe code 2024-06-26 15:29:49 +02:00
Nick Treleaven
5058aa95fe Fix Bugzilla 24630 - Casting a bool pointer to a mutable pointer type is unsafe 2024-06-26 01:05:08 +02:00
Nick Treleaven
e96efa0db1 Tweak message for unsafe cast to bool array/pointer
Add test for cast to `bool*`.
See https://issues.dlang.org/show_bug.cgi?id=24582.
2024-06-23 15:08:31 +02:00
Johan Engelen
349b493810 Fix bugzilla issue 24623: Rename CppRuntime_Clang/Gcc to CppRuntime_libcpp/libstdcpp. Add libcpp and libstdcpp -target= option recognition. 2024-06-22 11:55:11 +02:00
Nick Treleaven
3949a4dd3b
Fix Bugzilla 24622 - Modify const data with void[] concatenation/append (#16606) 2024-06-21 18:57:47 +03:00
Nick Treleaven
15f66f89c9 Fix Bugzilla 12885 - const union wrongly converts implicitly to mutable 2024-06-20 12:04:11 +02:00
Dennis
c0fcaa0e96
Fix bugzilla 24583 - di generator emits return scope and scope return in wrong order (#16595) 2024-06-18 17:12:59 +03:00
Nick Treleaven
c6058f9b76
Fix Bugzilla 17148 - Copying from const(void)[] to void[] breaks immu… (#16583) 2024-06-17 17:11:52 +08:00
Nick Treleaven
8d7839a9d9 Fix Bugzilla 24603 - Can copy from non-void array into void[] in safe code
Deprecate in safe code.
2024-06-16 08:59:16 +02: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
23e6712446
Fix Bugzilla 24582 - Detect unsafe cast(bool[]) (#16558)
Allow literal cast

Make deprecation

Add specific supplemental message
2024-06-13 11:23:34 +02:00
Nick Treleaven
295b0008e4
Fix Issue 23957 - Casting to derived extern(C++) class is unsafe (#15294)
Fix Issue 23957 - Casting to derived extern(C++) class is unsafe

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2024-06-12 13:49:50 +02:00
Brian Callahan
a3eb99191d Fix Bugzilla 24598 2024-06-11 07:20:29 +02:00
Nick Treleaven
1b2b3dd763
Fix Issue 24135 - Eponymous template member overloads not shown as call candidates (#15572) 2024-06-01 07:47:19 +08:00
Ben Jones
7f30b66d3d Fix Bugzilla Issue 24534 : goto can skip declarations in labeled statements without error 2024-05-20 13:59:40 -06:00
Walter Bright
0466791297
bitfields: add bitoffsetof, bitwidth, isBitfield (#16444) 2024-05-08 14:59:34 +03:00
Petar Kirov
057fb46e88
Merge pull request #16436 from ntrel/seq-index
[trivial] Fix out of bounds sequence index error message
2024-05-03 19:56:37 +03:00
Nick Treleaven
932ec7a37c Fix out of bounds sequence index error 2024-05-03 10:52:21 +01:00
Nick Treleaven
f1621176ef Add tests for bug-prone EmptyStatements
Related: https://github.com/dlang/dmd/pull/15409.
2024-04-30 01:23:13 +02:00
Dennis
b84fa4709f
Fix 22977 - can escape scope pointer returned by nested function (#14236) 2024-04-29 15:50:02 +03: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
Nick Treleaven
32e4910ab3
Make foreach_reverse with a delegate an error (#16418)
* Make `foreach_reverse` with a delegate an error

Deprecation goes back to at least 2016:
68fb91a130 (diff-13f50d9dea67df89a0535d6b8957f3145d49f71f6b72fdd3913f329a265e1423R1155)
2024-04-27 20:25:20 +08:00
Dennis
49c4afd93f
Demangle symbols in linker errors (#16021)
* Demangle symbols in linker errors

Fix bugzilla issue 5573

* Fix test output regex of needspkgmod

---------

Co-authored-by: Dennis Korpel <dennis@sarc.nl>
2024-04-24 14:35:14 +03:00
Nick Treleaven
56a0ea80b1
Fix Bugzilla 14128 - AliasDeclaration allows expressions, causing false … (#15863)
* Fix Issue 14128 - AliasDeclaration allows expressions, causing false code for ThisExp

* Add test case

* Fix deprecation comment

* Add changelog

* Use dummy out param, not null

* Change to error with __edition_latest_do_not_use
2024-04-19 17:55:31 +03:00
Nick Treleaven
dca92a75b7
[editions] Make body after contract an error (#16382)
* [editions] Make `body` after contract an error

* Mention --help in build.d module comment

* Add ASTBase.Module.edition property, always Edition.legacy for now
2024-04-18 10:26:20 +03:00
Walter Bright
d434acd8ed
fix bugzilla Issue 21923 - @live does not take destructor code into account (#16371) 2024-04-15 14:46:23 -07:00
Razvan Nitu
8f5c661c90
Fix Bugzilla 24485 - Invalid implicit ref return reinterpret cast for structs with copy constructor (#16364) 2024-04-10 15:44:40 +03:00
Iain Buclaw
0cfdd7a589
Merge pull request #16340 from dkorpel/editions-experiment
Start implementation of editions
2024-04-05 12:19:38 +02:00
Dennis Korpel
ca2ff4b752 Fix bugzilla 24477 - Union access of bool shouldn't be allowed in @safe 2024-04-03 10:52:30 +08:00
Dennis Korpel
0b677d90ee Fix 20148 - void initializated bool can be both true and false 2024-04-01 17:52:09 +02:00
Dennis Korpel
400dd0134d Start implementation of editions 2024-03-29 22:10:29 +01:00
Nick Treleaven
5a83930916 Require -m64 for test, impossible to get $?:64= to work 2024-03-25 17:00:02 +00:00
Nick Treleaven
5e74894ecd Long literal not allowed as array index on x86 2024-03-25 15:07:44 +00:00
Nick Treleaven
c63bb20c83 Fix Bugzilla 24450 - apply VRP to foreach indices when array is of known length 2024-03-25 14:06:12 +00:00
Richard (Rikki) Andrew Cattermole
dffd899508
Implement UAX31 character ranges (#15307) 2024-03-18 11:19:16 -07:00
Iain Buclaw
e362917ac6 Merge remote-tracking branch 'upstream/stable' into merge_stable 2024-03-16 01:17:16 +00:00
Dennis Korpel
55dcc3dc82 Fix endian issue when printing hex string literals 2024-03-15 12:31:41 +01:00
Iain Buclaw
2a7a9c459a
Merge pull request #16293 from dkorpel/hexstring-impl-conv-stable
[stable] Make hex strings implicitly convert to integer arrays
2024-03-15 09:41:59 +01:00