Commit graph

521 commits

Author SHA1 Message Date
Boris Carvajal
55bb175431 [dmd-cxx] Simplify some Proxy.opDispatch conditions 2021-06-11 12:19:08 +00:00
Iain Buclaw
f89dc217a6
[dmd-cxx] Backport some more import fixes (#7933)
[dmd-cxx] Backport some more import fixes
merged-on-behalf-of: Iain Buclaw <ibuclaw@users.noreply.github.com>
2021-04-03 01:43:32 +02:00
FeepingCreature
83a7cd4d59 [dmd-cxx] Fix issues arising from the DMD 9029 fix (types match to alias) 2021-04-02 13:53:32 +08:00
Iain Buclaw
dd2edb247f Synchronize dmd-cxx with gdc-stable 2019-01-05 14:10:15 +01:00
The Dlang Bot
7bf3794649 Merge pull request #5408 from thaven/autoimplement_with_baseclass
AutoImplement with baseclass
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2017-08-01 08:20:22 +02:00
Harry T. Vennik
9706f6e360 Allow auto-implementing an interface while deriving from a base class.
- Added additional AutoImplement template which takes one extra
  parameter, which specifies the baseclass to use.
- Added Self type parameter to private template AutoImplement_Helper.
- Get the constructor overloads from the baseclass of Self, rather
  than from Base, which may be an interface.
- Added relevant unittests

This commit includes a manual changelog entry.
2017-07-29 12:23:53 +02:00
Sebastian Wilzbach
a42a2e191f Add bookmark table to std.typecons 2017-07-24 20:55:27 +02:00
Jack Applegame
2e293eb6ed Remove extra semicolon 2017-07-23 16:56:56 +03:00
Sebastian Wilzbach
4aaffede52 Merge pull request #4764 from tmccombs/unique-interface
Allow using Unique with interfaces
2017-07-21 23:18:17 +02:00
Sebastian Wilzbach
70f06b2357 Remove old, redundant private import access specifier
Very very old versions of D (well into 0.x) had imports public by default,
like C header files. This modernizes the codebase and removes the
redundant `private` access specifier.
This has been done with:

sed "s/private import/import/g" -i **/*.d
2017-07-11 12:28:39 +02:00
The Dlang Bot
681c74357a Merge pull request #5517 from wilzbach/runnable-examples
Make Phobos module examples runnable
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2017-07-10 17:09:40 +02:00
Martin Nowak
effe4fda00 Merge remote-tracking branch 'upstream/stable' into merge_stable 2017-07-10 04:15:21 +02:00
Sebastian Wilzbach
28b521b700 Make std.typecons examples runnable 2017-07-09 16:22:53 +02:00
Jonathan M Davis
a7ea880eb2 Fix issue 17482: Fix Nullable!Variant equality checks. 2017-07-04 21:08:11 -06:00
Sebastian Wilzbach
10d05229ae Make Phobos module examples runnable 2017-07-02 00:22:13 +02:00
Sebastian Wilzbach
a311ba161a Remove hard-coded DScanner exclusion of std.traits and std.typecons 2017-06-30 04:47:36 +02:00
Sebastian Wilzbach
818deb3615 Fix DDoc macros 2017-06-30 01:39:24 +02:00
H. S. Teoh
46cfe3fcc1 Fix broken ddoc macro. 2017-06-29 11:11:17 -07:00
tsbockman
e63c620433 issue 15645 - Prevent unsafe usage of Tuple.slice 2017-04-22 08:14:54 -07:00
RazvanN7
df400d9dff Fix Issue 17283 - std.experimental.typecons uses private module members 2017-04-03 12:55:49 +03:00
cjoan
37e1bbea3f More edits to typecons.RefCounted 2017-03-29 01:44:38 -04:00
cjoan
abddd888f2 Fixed typos in RefCounted documentation. 2017-03-29 00:06:51 -04:00
cjoan
9c8a71ef6e Clarify deallocation done by typecons.RefCounted.
I had trouble understanding how RefCounted!T was supposed to help me manage resources.  These document changes should clarify the process and make it easier for others to understand.

This is follow-up after this post on the D learn forum: https://forum.dlang.org/post/qctmkqpqnreysxcjmrgm@forum.dlang.org
and after commits cd86cc25b6 and 33217eb46f "Clarify deallocation done by std.typecons.Unique."
2017-03-22 13:04:29 -04:00
Thayne McCombs
70a9e2a503 Improve unit test for Unique with interface 2017-03-16 22:13:02 -06:00
Thayne McCombs
7cbea7473a Remove trailing space 2017-03-16 21:40:55 -06:00
Thayne McCombs
894bdfe1df Merge branch 'master' into unique-interface 2017-03-16 12:56:55 -06:00
cjoan
cd86cc25b6 Clarify deallocation done by typecons.Unique.(2nd)
Replace $(REF destroy, object) with $(D destroy) in typecons.Unique documentation so that DDOC is more likely to format it correctly.
This edit is follow-up to the earlier "Clarify deallocation done by typecons.Unique." commit.
2017-03-10 17:15:46 -05:00
cjoan
33217eb46f Clarify deallocation done by std.typecons.Unique.
I had trouble understanding how Unique!T was supposed to help me manage resources.  These document changes should clarify the process and make it easier for others to understand.

Caveat: I'm not absolutely sure if $(REF destroy, object) will do what I intend after doc generation.  I don't have time to learn how to build Phobos' documentation to test it.  I intend it to reference https://dlang.org/library/object/destroy.html so that the reader can easily understand the implications.

This is follow-up after this post on the D learn forum: https://forum.dlang.org/post/qctmkqpqnreysxcjmrgm@forum.dlang.org

If this change goes well, then I will attempt to update RefCounted!T as well.
2017-03-09 12:24:12 -05:00
Jack Stouffer
0b88ae0cfa Merge pull request #5174 from dukc/SafeUnique
Typecons.Unique.release() change
2017-03-07 16:24:46 -05:00
Sebastian Wilzbach
a1bb0515fc Automatically add spaces to binary operators (>=)
command:

sed -E "s/([[:alnum:]]) >= ([[:alnum:]])/\1 >= \2/g" -i **/*.d
sed -E "s/([[:alnum:]])>= ([[:alnum:]])/\1 >= \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) >=([[:alnum:]])/\1 >= \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
ef7be4b60d Automatically add spaces to binary operators (<<)
command:

sed -E "s/([[:alnum:]]) << ([[:alnum:]])/\1 << \2/g" -i **/*.d
sed -E "s/([[:alnum:]])<< ([[:alnum:]])/\1 << \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) <<([[:alnum:]])/\1 << \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
d905ef53b1 Automatically add spaces to binary operators (<=)
command:

sed -E "s/([[:alnum:]]) <= ([[:alnum:]])/\1 <= \2/g" -i **/*.d
sed -E "s/([[:alnum:]])<= ([[:alnum:]])/\1 <= \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) <=([[:alnum:]])/\1 <= \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
0b33b50812 Automatically add spaces to binary operators (!=)
command:

sed -E "s/([[:alnum:]]) != ([[:alnum:]])/\1 != \2/g" -i **/*.d
sed -E "s/([[:alnum:]])!= ([[:alnum:]])/\1 != \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) !=([[:alnum:]])/\1 != \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
a2c6398332 Automatically add spaces to binary operators (==)
command:

sed -E "s/([[:alnum:]]) == ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]])== ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) ==([[:alnum:]])/\1 == \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
425ab667a3 Automatically set the range style from a..b -> a .. b
Commands:

sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
Andrei Alexandrescu
027ae18cab Merge pull request #5175 from wilzbach/style-cast-space
Add a check to enforce space after cast(..) expressions
2017-02-21 20:11:23 -05:00
dukc
396105c3ec Typecons.Unique.release uses std.algorithm.move instead of reinventing the wheel. 2017-02-21 23:50:48 +02:00
Dmitry Olshansky
ef0dffab0d Merge pull request #5119 from aermicioi/issue_17177
fix issue 17177.  AutoImplement fails on function overload sets with …
2017-02-21 17:37:19 +01:00
Sebastian Wilzbach
805c720595 Unify Phobos by ensuring there's always a space after cast(...)
Command:

sed -E 's/([^"])cast\(([^)]*?)\)([[:alnum:]])/\1cast(\2) \3/g' -i **/*.d
2017-02-21 16:40:20 +01:00
Sebastian Wilzbach
5521541032 Unify assert style to have no spaces between the first brace
Application of:

sed -E "s/assert +\(/assert(/" -i **/*.d
2017-02-21 15:27:15 +01:00
Alexandru Ermicioi
88f984d5f4 Fixed unittest style problems. 2017-02-13 23:05:40 +02:00
Alexandru Ermicioi
009ec0cf72 Added unittest to bug fix, testing if "parent" is aliased to function overload set. 2017-02-13 22:51:57 +02:00
Bastiaan Veelo
f967356f10 [doc] Typo. 2017-02-13 20:43:34 +01:00
Alexandru Ermicioi
085902b3d6 fix issue 17177. AutoImplement fails on function overload sets with "cannot infer type from overloaded function symbol". 2017-02-12 17:43:40 +02:00
Per Nordlöw
ddebfaf3f0 Make RefCounted pure when possible
Acked-by: Per Nordlöw <per.nordlow@gmail.com>
2017-01-31 16:42:19 +01:00
Jack Stouffer
5da61cafac Merge pull request #5059 from BBasile/issue-11703
fix issue 11703, Typedef properties should not be of the original type
2017-01-27 12:53:37 -05:00
Basile Burg
5fedf3503d
fix issue 11703, Typedef properties should not be of the original type 2017-01-27 00:22:50 +01:00
Basile Burg
181db425c9
fix issue 17116 - std.typecons.ReplaceType is not able to process const delegate 2017-01-23 21:51:43 +01:00
Jonathan M Davis
5dc7aa2421 Fix issue #13017: opEquals for null std.typecons.Nullable
I was getting sick of this not working, and there have been multiple bug
reports on this, so I'm just fixing it. With these changes, using == and
!= on null Nullables will not result in an AssertError but instead will
consider them equal if they're both null, equal if they're both non-null
and have the same value, and not equal otherwise.
2017-01-14 11:37:56 -08:00
Sebastian Wilzbach
e67c579f91 Add nullable{,Ref} construction functions 2016-12-23 23:22:21 +01:00