Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
update comments in object.d
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Jun 27, 2016
1 parent 6251718 commit c1ef9ec
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions src/object.d
Expand Up @@ -8,11 +8,6 @@
* Authors: Walter Bright, Sean Kelly
*/

/* Copyright Digital Mars 2000 - 2011.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
module object;

private
Expand Down Expand Up @@ -2125,7 +2120,7 @@ pure nothrow unittest
}
}

pure /*nothrow @@@BUG5555@@@*/ unittest
pure /*nothrow */ unittest
{
auto a = [ 1:"one", 2:"two", 3:"three" ];
auto b = a.dup;
Expand Down Expand Up @@ -2477,7 +2472,7 @@ void _postblitRecurse(E, size_t n)(ref E[n] arr)

struct InnerMiddle {}

version(none) // @@@BUG@@@ 14242
version(none) // https://issues.dlang.org/show_bug.cgi?id=14242
struct InnerElement
{
static char counter = '1';
Expand Down Expand Up @@ -2511,7 +2506,7 @@ void _postblitRecurse(E, size_t n)(ref E[n] arr)
char[] s;
InnerTop top;
InnerMiddle middle;
version(none) InnerElement[3] array; // @@@BUG@@@ 14242
version(none) InnerElement[3] array; // https://issues.dlang.org/show_bug.cgi?id=14242
int a;
InnerBottom bottom;
~this() @safe nothrow pure { order ~= "destroy outer"; }
Expand Down Expand Up @@ -2587,7 +2582,7 @@ unittest
}

// Test handling of fixed-length arrays
// Separate from first test because of @@@BUG@@@ 14242
// Separate from first test because of https://issues.dlang.org/show_bug.cgi?id=14242
unittest
{
string[] order;
Expand Down Expand Up @@ -2630,7 +2625,7 @@ unittest
}

// Test handling of failed postblit
// Not nothrow or @safe because of @@@BUG@@@ 14242
// Not nothrow or @safe because of https://issues.dlang.org/show_bug.cgi?id=14242
/+ nothrow @safe +/ unittest
{
static class FailedPostblitException : Exception { this() nothrow @safe { super(null); } }
Expand Down Expand Up @@ -3084,7 +3079,7 @@ unittest
arr = arr[0 .. 1].assumeSafeAppend(); //pass by value
}

//@@@10574@@@
// https://issues.dlang.org/show_bug.cgi?id=10574
unittest
{
int[] a;
Expand Down Expand Up @@ -3257,7 +3252,7 @@ private size_t getArrayHash(in TypeInfo element, in void* ptr, in size_t count)
}


// @@@BUG5835@@@ tests:
// Tests ensure TypeInfo_Array.getHash uses element hash functions instead of hashing array data

unittest
{
Expand All @@ -3268,7 +3263,7 @@ unittest
override hash_t toHash() { return 0; }
}
C[] a1 = [new C(11)], a2 = [new C(12)];
assert(typeid(C[]).getHash(&a1) == typeid(C[]).getHash(&a2)); // fails
assert(typeid(C[]).getHash(&a1) == typeid(C[]).getHash(&a2));
}

unittest
Expand All @@ -3279,7 +3274,7 @@ unittest
hash_t toHash() const @safe nothrow { return 0; }
}
S[] a1 = [S(11)], a2 = [S(12)];
assert(typeid(S[]).getHash(&a1) == typeid(S[]).getHash(&a2)); // fails
assert(typeid(S[]).getHash(&a1) == typeid(S[]).getHash(&a2));
}

@safe unittest
Expand All @@ -3294,7 +3289,7 @@ unittest
}

int[S[]] aa = [[S(11)] : 13];
assert(aa[[S(12)]] == 13); // fails
assert(aa[[S(12)]] == 13);
}

/// Provide the .dup array property.
Expand Down

0 comments on commit c1ef9ec

Please sign in to comment.