File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -6,19 +6,20 @@ public class MalDissoc extends MalSubr
66 MalObject .slice (args , 1 ) @ => MalObject ks [];
77
88 MalObject result [0 ];
9- int cachedKeys [0 ];
9+ string cachedKeys [0 ];
1010
1111 for ( 0 => int i ; i < ks .size (); i ++ )
1212 {
13- true => cachedKeys [ks [i ].stringValue ];
13+ ks [ i ]. type => cachedKeys [ks [i ].stringValue ];
1414 }
1515
1616 for ( 0 => int i ; i < map .size (); 2 +=> i )
1717 {
1818 map [i ] @ => MalObject key ;
1919 map [i +1 ] @ => MalObject value ;
2020
21- if ( !cachedKeys [key .stringValue ] )
21+ if ( cachedKeys [key .stringValue ] == null
22+ || cachedKeys [key .stringValue ] != key .type )
2223 {
2324 result << key ;
2425 result << value ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public class MalGet extends MalSubr
2020 map [i ] @ => mapKey ;
2121 map [i +1 ] @ => mapValue ;
2222
23- if ( keyName == mapKey .stringValue )
23+ if ( keyName == mapKey .stringValue && args [ 1 ]. type == mapKey . type )
2424 {
2525 true => isKeyPresent ;
2626 }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public class MalIsContains extends MalSubr
1414 {
1515 map [i ] @ => mapKey ;
1616
17- if ( keyName == mapKey .stringValue )
17+ if ( keyName == mapKey .stringValue && args [ 1 ]. type == mapKey . type )
1818 {
1919 true => isKeyPresent ;
2020 }
You can’t perform that action at this time.
0 commit comments