Skip to content

Commit

Permalink
don't convert to array objects that are both arrays and hash maps
Browse files Browse the repository at this point in the history
  • Loading branch information
gedaiu committed Aug 24, 2022
1 parent 9aa69b0 commit bb15273
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion source/fluentasserts/core/evaluation.d
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class ObjectEquable(T) : EquableValue {
}

EquableValue[] toArray() {
static if(__traits(hasMember, T, "byValue")) {
static if(__traits(hasMember, T, "byValue") && !__traits(hasMember, T, "byKeyValue")) {
try {
return value.byValue.map!(a => a.equableValue(SerializerRegistry.instance.serialize(a))).array;
} catch(Exception) {}
Expand Down
1 change: 0 additions & 1 deletion test/operations/approximately.d
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module test.operations.approximately;


import fluentasserts.core.expect;
import fluent.asserts;

Expand Down

0 comments on commit bb15273

Please sign in to comment.