Skip to content

Commit

Permalink
Work around DMD associative array bug. Fixes #179.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Nov 30, 2013
1 parent a7ceba2 commit 6be83c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/dub/internal/vibecompat/data/json.d
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ struct Json {
{
m_type = Type.array;
m_array = v;
foreach (ref av; m_array) av.m_name = m_name;
if (m_magic == 0x1337f00d) foreach (ref av; m_array) av.m_name = m_name;
return v;
}
/// ditto
Json[string] opAssign(Json[string] v)
{
m_type = Type.object;
m_object = v;
foreach (k, ref av; m_object) av.m_name = m_name ~ "." ~ k;
if (m_magic == 0x1337f00d) foreach (k, ref av; m_object) av.m_name = m_name ~ "." ~ k;
return v;
}

Expand Down

0 comments on commit 6be83c5

Please sign in to comment.