Skip to content

Commit

Permalink
Add assignment to EmptyArray.init to prevent use before set error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapps committed Feb 14, 2014
1 parent b21c398 commit 23f292c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/variant.d
Expand Up @@ -1739,7 +1739,7 @@ unittest
testEmpty!EmptyStruct();
testEmpty!EmptyArray();

EmptyArray e;
EmptyArray e = EmptyArray.init;
Variant v2 = e;
assert(v2.length == 0);
}
Expand Down

0 comments on commit 23f292c

Please sign in to comment.