Commit graph

15875 commits

Author SHA1 Message Date
RubyTheRoobster
7caaa7838d I have no idea why the unittest works now, but okay 2022-08-10 15:37:32 -04:00
RubyTheRoobster
e0280ae2fc Use Unshared only when necessary 2022-08-10 14:49:05 -04:00
RubyTheRoobster
ce098b99d4 Fix tests (they should still work) 2022-08-04 08:08:37 -04:00
RubyTheRoobster
4b5cfc17b9 D Style Fix (again) 2022-08-03 21:12:08 -04:00
RubyTheRoobster
9aa628a64d D Style Fix 2022-08-03 21:08:12 -04:00
RubyTheRoobster
4cfb36aece Add tests 2022-08-03 20:57:38 -04:00
RubyTheRoobster
6343d5a58d Private the Unshared alias. 2022-08-03 14:19:22 -04:00
RubyTheRoobster
15860563c7 fixup! Remove limit-violating lines to fit D style. 2022-08-03 13:46:14 -04:00
RubyTheRoobster
08ea63f4f4 Remove limit-violating lines to fit D style. 2022-08-03 13:14:38 -04:00
RubyTheRoobster
2023b271e5 Fix issue 23140 - Array!T where T is a shared class no longer works 2022-08-03 11:58:12 -04:00
Razvan Nitu
7e0dbdf1a3
Merge pull request #8500 from RazvanN7/fix_scope_failure
Use try-catch instead of scope(failure) for block that returns
2022-07-07 16:08:38 +03:00
RazvanN7
52935b182a Use try-catch instead of scope(failure) for block that returns 2022-07-07 15:28:43 +03:00
Tomáš Chaloupka
9ac9d359ac Fix 23132 - Avoid ranges copy when compared for equality 2022-06-21 15:09:48 +00:00
RazvanN7
d2c3da6d50 Fix Issue 20182 - [REG 2.086.0] std.traits.ParameterDefaults fails for copy constructor of nested struct 2022-04-18 22:26:49 +00:00
Razvan Nitu
dc6fcbd8ef
Merge pull request #8426 from WalterBright/int128
add std.int128 a 128 bit integer arithmetic type
2022-04-18 09:18:31 +03:00
Dennis
0745f76249
Merge pull request #8431 from dkorpel/fix-std-path-variadic-test
Fix std.path unittest returning dangling pointer
2022-04-17 09:02:56 +02:00
Dennis Korpel
ef3dc5f5bb Fix std.path unittest returning dangling pointer 2022-04-16 15:59:43 +02:00
Walter Bright
60f5bfa45a add std.int128 2022-04-14 11:01:44 -07:00
Dennis Korpel
f56b33961e Fix issue 22213 - Base64: Missing @nogc attribute on encodeLength 2022-04-13 16:06:38 +02:00
Dennis Korpel
c0cc5e917d Fix switch fallthrough 2022-04-11 11:26:11 +00:00
The Dlang Bot
99e9c1b774
Merge pull request #8425 from MartinNowak/merge_stable
merge stable

Signed-off-by: Dennis <dkorpel@users.noreply.github.com>
Merged-on-behalf-of: Iain Buclaw <ibuclaw@users.noreply.github.com>
2022-04-01 11:37:35 +00:00
Martin Nowak
0e3efabacc Merge remote-tracking branch 'upstream/stable' into merge_stable 2022-04-01 10:23:49 +02:00
Razvan Nitu
ee6f7d018b
Merge pull request #8422 from MoonlightSentinel/throw-windows-exception
Fix 22947 - Use wenforce in sysErrorString
2022-03-31 11:24:51 +03:00
Dennis Korpel
ba92563a0d Fix issue 22939 - bad error message: Error: no property msg for type string 2022-03-29 18:51:30 +00:00
Dennis Korpel
6ceeb18c82 Improve std.conv.parse support for scope strings 2022-03-28 08:18:27 +00:00
MoonlightSentinel
362e81830c
Fix 13541 - Replace usages of sysErrorString` with a helper function
`sysErrorString` throws an exception for unknown error codes (e.g. from
libraries using `SetLastError`) and hence could hide the actual error
that caused the call to `sysErrorString`.

The new helper function wraps the error code lookup and returns `Error X`
on failure.
2022-03-28 01:01:25 +02:00
MoonlightSentinel
304160f5af
Issue 13541 - Use wenforce instead of enforce + sysErrorString
This ensures that the actual error message won't be suppressed when the
lookup error code => message fails. The exception will also be more
informative because `WindowsException` is explicitly intended for
Windows API errors.
2022-03-28 01:01:19 +02:00
MoonlightSentinel
5c60f05dc9
Fix 22947 - Use wenforce in sysErrorString
This ensures that the method throws a `WindowsException` initialised
with the proper error code. Also avoids unrelated exceptions that
could suppress the error which caused the call to `sysErrorString`.
2022-03-28 00:25:18 +02:00
MoonlightSentinel
167b1af778 Fix 22946 - Mark WindowsException ctor as nothrow
Catch possible exceptions arising from e.g. UTF decoding and ensure
that the message buffer doesn't contain partial output from a failed
step.

The logic is seperated into a dedicated method because it's required
for another bugfix.
2022-03-27 22:15:07 +00:00
Cameron Ross
90f65d49fb Add range interface to Nullable 2022-03-27 19:18:11 +00:00
Dennis
6e5c873c5a
Merge pull request #8418 from dkorpel/pure-scope-throw1
Make `toLower` and `toUpper` `return scope`
2022-03-27 19:40:49 +02:00
Paul Backus
c6b4bd9638 [Refactor] Move toCtString to std.conv
Previously, it was duplicated in std.functional and std.sumtype.
2022-03-26 14:04:37 +00:00
dkorpel
2ac53fa164 Make toLower and toUpper return scope 2022-03-25 20:08:06 +01:00
Dennis Korpel
5636c8cdcc Fix incorrect return scope annotations 2022-03-22 18:08:31 +00:00
Iain Buclaw
2b5ab004b2 Add preliminary support for GNU/Hurd 2022-03-22 14:11:33 +00:00
Paul Backus
fc8f333ca3
Fix issue 22873 - Wrong std.format output for inout (#8409)
Fix issue 22873 - Wrong std.format output for `inout`

Signed-off-by: Steven Schveighoffer <schveiguy@users.noreply.github.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2022-03-22 13:32:02 +00:00
Arne Ludwig
3a2cf7f3cb Fixed negation of BitFlags
- negation did not work with unsigned integers with dmd v2.099.0
- also made double negation of flags possible
2022-03-22 12:47:36 +00:00
Paul Backus
d9d104c9bc Fix issue 22901 - Can't construct inout SumType
The template constraint is needed to ensure that the inout constructor
overload is only considered when it is an exact match, without qualifier
conversions.

Without the constraint, a constructor call such as

    const(SumType!(int[]))([1, 2, 3])

...would be ambiguous, since it would match both the const constructor
overload and the inout constructor overload at the "match with qualifier
conversion" level.
2022-03-20 14:57:40 -04:00
Paul Backus
8a368bde34 Add std.traits.DeducedParameterType 2022-03-20 14:57:25 -04:00
Dennis Korpel
7ee15aa567 Fix typo 'preforming' 2022-03-17 14:28:21 +01:00
Atila Neves
22959ab86c
Increase @safety of std.conv (#8410)
Increase @safety of std.conv

Signed-off-by: Dennis <dkorpel@users.noreply.github.com>
Merged-on-behalf-of: Dennis <dkorpel@users.noreply.github.com>
2022-03-14 16:33:45 +00:00
Razvan Nitu
16cb085b58
Merge pull request #8376 from pbackus/fix-22736
Add std.functional.bind
2022-03-10 16:39:15 +02:00
aG0aep6G
3a97e4a9e9 fix issue 22867 - std.utf.decode changes offset despite error. 2022-03-10 13:08:21 +01:00
Steven Schveighoffer
526beb3d84 Change default log level to info instead of warning. 2022-03-09 11:51:56 -05:00
Dennis Korpel
3d8b95791f Fix return scope in cartesianProduct Result.save 2022-03-09 15:37:09 +00:00
Martin Nowak
9d005f0e3b Merge remote-tracking branch 'upstream/stable' into merge_stable 2022-03-08 16:05:58 +01:00
Paul Backus
9d1aeeca2b Add std.functional.bind
Fixes Issue 22736 - Add destructuring bind for std.typecons.Tuple tuples
2022-03-07 15:40:27 -05:00
canopyofstars
668d43c5df Fix 22851 - Add source reference to std.sumtype
Add `Source: $(PHOBOSSRC std/sumtype.d)` to `std.sumtype's` module documentation.
2022-03-06 03:34:35 +00:00
Razvan Nitu
f4138b6740
Merge pull request #8399 from dkorpel/systime-opbinary-retscope
Annotate `SysTime.opBinary` as `returnScope`
2022-03-04 11:21:56 +02:00
Johan Engelen
ba473aebe8 Disable large allocation test that is not supported by AddressSanitizer
AddressSanitizer will report an error (rather than returning `null`) for such large allocations.
2022-03-03 02:02:31 +00:00