File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -658,6 +658,8 @@ class Interp {
658658 isAllObject = isAllObject && Reflect .isObject (key );
659659 isAllEnum = isAllEnum && Reflect .isEnumValue (key );
660660 }
661+
662+ #if (haxe_ver >= 4.1)
661663 if ( isAllInt ) {
662664 var m = new Map <Int ,Dynamic >();
663665 for ( i => key in keys )
@@ -682,6 +684,20 @@ class Interp {
682684 m .set (key , values [i ]);
683685 return m ;
684686 }
687+ #else
688+ var m : Dynamic = {
689+ if ( isAllInt ) new haxe.ds. IntMap <Dynamic >();
690+ else if ( isAllString ) new haxe.ds. StringMap <Dynamic >();
691+ else if ( isAllEnum ) new haxe.ds. EnumValueMap <Dynamic , Dynamic >();
692+ else if ( isAllObject ) new haxe.ds. ObjectMap <Dynamic , Dynamic >();
693+ else null ;
694+ }
695+ if ( m != null ) {
696+ for ( n in 0 ... keys .length )
697+ setMapValue (m , keys [n ], values [n ]);
698+ return m ;
699+ }
700+ #end
685701 error (ECustom (" Invalid map keys " + keys ));
686702 return null ;
687703 }
You can’t perform that action at this time.
0 commit comments