Commit graph

146 commits

Author SHA1 Message Date
Geod24
0fb95b8c27 Usage of WEB macro for License everywhere 2014-10-15 11:30:42 +02:00
Sönke Ludwig
c9d8ee5b2f Code clean up. 2014-09-11 08:28:04 +02:00
Sönke Ludwig
6c04790e41 Don't throw static exceptions. 2014-09-10 12:53:56 +02:00
Sönke Ludwig
fd5ff8a704 Use positional arguments for format(). 2014-09-10 12:53:12 +02:00
Sönke Ludwig
7b805bde94 Use VariantException instead of a bare Exception. 2014-09-10 12:52:17 +02:00
Sönke Ludwig
cb5d83dad9 Fix issue #13352 - Only perform Algebraic arithmetic with allowed types.
Adds a static check allowed!T before trying any particular numeric type. Also checks for an exact type match in case of a raw (non-Variant) operand and prefers that to one of the fixed numeric types. Finally, it loosens the restriction for opArithmetic to only work for equal Variant types.

Conflicts:
	std/variant.d
2014-09-10 12:52:17 +02:00
Михаил Страшун
9c8a1a5dfe Merge pull request #2453 from s-ludwig/issue_13354
Fix issue #13354 - Use a generic Variant for passing opIndex/opIndexAssign arguments.
2014-09-06 18:44:37 +02:00
H. S. Teoh
76db0de19c Eliminate C-style array declarations. 2014-08-30 06:51:27 -07:00
Dmitry Olshansky
ef1b0bcf97 Merge pull request #2439 from 9rnsr/fix13300
[REG2.067a] Issue 13300 - pure function 'std.array.Appender!(T[]).Appender.ensureAddable' cannot call impure function 'test.T.__fieldPostBlit'
2014-08-22 23:26:26 +04:00
Sönke Ludwig
352dee3a89 Fix issue #13354 - Use a generic Variant for passing opIndex/opIndexAssign arguments.
Also improves the error message when an incompatible index or value type is used by printing the actual type ID instead of "void[]" in the thrown exception.
2014-08-22 12:30:13 +02:00
Nick Treleaven
74cfb8fb38 Fix variant.d typo 2014-08-21 12:07:03 +01:00
k-hara
1baf12b102 fix Issue 13300 - pure function 'std.array.Appender!(T[]).Appender.ensureAddable' cannot call impure function 'test.T.__fieldPostBlit' 2014-08-19 22:35:56 +09:00
Yuriy Glukhov
625f98e13a hasElaborateAssign -> hasElaborateCopyConstructor.
Corrected check for elaborate copying.
2014-08-19 15:52:04 +03:00
k-hara
a846ecb18b fix Issue 13284 - Cannot match shared classes at receive 2014-08-12 16:37:20 +09:00
k-hara
57f9c81933 [Refactoring] Make unittest exhaustive 2014-08-12 16:34:32 +09:00
Daniel Murphy
cacd5f645f Merge pull request #2386 from MetaLang/variant-remove-float-min
Fix Issue 13230: std.variant.Variant Uses Deprecated .min Property in opArithmetic When T is a Floating Point Type
2014-08-04 18:54:02 +10:00
MetaLang
85bccdb9ab Replace use of T.min to determine signedness with std.traits.isUnsigned. 2014-08-04 00:50:17 -03:00
Andrej Mitrovic
76b03836e8 Merge pull request #2390 from 9rnsr/enforceProp
fix property enforcement
2014-08-02 12:52:13 +02:00
Ognjen Ivkovic
f802ee6ce1 Remove workaround for issue 12164. 2014-08-01 14:32:21 -06:00
k-hara
35bf8e1719 fix property enforcement 2014-07-30 19:15:39 +09:00
yglukhov
7da102aee6 Fixed handling of a struct with no "length" field defined but with opDispatch of inappropriate type. 2014-07-15 23:57:01 +03:00
Steven Schveighoffer
3cd7afcb1b Merge pull request #2330 from joakim-noah/strerror_move
Deprecate std.c.string and move its contents to druntime
2014-07-15 16:10:14 -04:00
Михаил Страшун
45fda72192 Merge pull request #2147 from yglukhov/issue10194
Issue 10194. Variant does not call struct destructors.
2014-07-14 13:40:22 +03:00
Joakim
dc67efc3c4 Deprecate std.c.string and move its contents to druntime 2014-07-13 12:47:26 -05:00
k-hara
6ba09e0c6d fix Issue 10916 - toHash on VariantN not being recognised
Make VariantN.toHash() const nothrow @safe. Assume that `VariantN.type` property is @safe nothrow.
2014-07-05 00:41:30 +09:00
k-hara
18efc8c5dc fix Issue 13000 - Casts should be removed to utilize features of inout 2014-06-28 21:37:02 +09:00
k-hara
d2345918b4 Remove redundant attributes 2014-06-27 08:34:15 +09:00
Dmitry Olshansky
d3fa054a9c Merge pull request #2188 from Kapps/fix12771
Fix issue 12771 - Variant opIndex for static arrays is not implemented.
2014-06-06 11:34:56 +03:00
Ognjen Ivkovic
e6664b1230 Shorten array checks to isArray 2014-05-26 18:30:52 -06:00
Ognjen Ivkovic
8378473199 Fix issue 12771 - Variant opIndex for static arrays is not implemented. 2014-05-19 18:58:01 -06:00
monarchdodra
001fad4558 Remove trailing whitespaces 2014-05-17 15:35:25 +02:00
uran
254c27971d Implemented elaborate copying support. 2014-05-06 16:07:51 +03:00
uran
0c40d1ea64 Issue 10194. Variant does not call struct destructors. 2014-05-06 13:06:31 +03:00
Andrej Mitrovic
c8656c37b7 Fix Issue 12600 - Variant should support coercion to bool. 2014-04-23 21:27:59 +02:00
Andrej Mitrovic
7f9df4a886 Strip spaces. 2014-04-23 21:24:58 +02:00
Dylan Knutson
bcf0f978e5 Add unittest for 12540 2014-04-11 12:24:34 -07:00
Andrei Alexandrescu
549657fe65 Merge pull request #1963 from Kapps/fix12157
Fix issue 12157 - Variant opEquals always returns false for classes.
2014-03-15 10:21:44 -07:00
Yazan S. Dabain
a81f6200cf [Trivial] Fix documentation typos 2014-02-28 21:08:19 +02:00
Ognjen Ivkovic
6b91d4e1a1 Added workaround for bug 12164.
Style: Fix lack of space after if.
2014-02-23 23:42:36 -06:00
Andrej Mitrovic
91c85101e8 Merge pull request #1934 from Kapps/fix8580
Fix issue 8580 - Peek returns an invalid pointer for structs larger than Variant.size.
2014-02-17 10:05:59 +01:00
Ognjen Ivkovic
0c82698b6f Fix issue 8580 - Peek returns an invalid pointer for structs larger than Variant.size.
Style: Add space between if and condition.
2014-02-17 01:43:24 -06:00
Ognjen Ivkovic
51fae691de Remove code duplication in Variant fptr for compare selector. 2014-02-14 01:57:46 -06:00
Ognjen Ivkovic
83b0cf52a5 Fix issue 12157 - Variant opEquals always returns false for classes and interfaces. 2014-02-14 01:47:44 -06:00
Ognjen Ivkovic
467d5d684b Fixed unittests to include original, proper, test case. 2014-02-14 00:26:32 -06:00
Ognjen Ivkovic
23f292ce1c Add assignment to EmptyArray.init to prevent use before set error. 2014-02-14 00:09:50 -06:00
Ognjen Ivkovic
b21c398ca2 Fix issue 10958 - Variant fails to compile for types with sizeof == 0. 2014-02-14 00:04:22 -06:00
k-hara
1323bd4f00 fix Issue 12071 - Algebraic won't take delegate returning structure
Use `Variant` rather than `VariantN` in order to pack arguments and returned value in opCall.
2014-02-11 21:02:02 +09:00
k-hara
b391b2ec9f Convert to new alias syntax 2014-02-11 15:27:05 +09:00
k-hara
545a9450f8 fix property enforcement 2014-02-10 22:24:02 +09:00
monarch dodra
67a4ad1f69 Merge pull request #1869 from GoldMax/Issue-7069
The std.traits.ImplicitConversionTargets returns wrong result for dchar
2014-01-31 04:11:11 -08:00