File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -556,8 +556,6 @@ struct StringMap(T, U = uint)
556556 return implementation._values[index];
557557 }
558558 assert (index <= length);
559- index = index < length ? implementation.indices[index] : length;
560- assert (index <= length);
561559 }
562560 else
563561 {
@@ -623,8 +621,6 @@ struct StringMap(T, U = uint)
623621 return implementation.values [index];
624622 }
625623 assert (index <= length);
626- index = index < length ? implementation.indices[index] : length;
627- assert (index <= length);
628624 }
629625 else
630626 {
@@ -942,3 +938,18 @@ private struct StructImpl(T, U = uint)
942938 return false ;
943939 }
944940}
941+
942+ unittest
943+ {
944+ import mir.algebraic_alias.json: JsonAlgebraic;
945+ import mir.string_map: StringMap;
946+
947+ StringMap! JsonAlgebraic token;
948+ token[` access_token` ] = " secret-data" ;
949+ token[` expires_in` ] = 3599 ;
950+ token[` token_type` ] = " Bearer" ;
951+
952+ assert (token[` access_token` ] == " secret-data" );
953+ assert (token[` expires_in` ] == 3599 );
954+ assert (token[` token_type` ] == " Bearer" ); // mir/string_map.d(511): No member: token_type
955+ }
You can’t perform that action at this time.
0 commit comments