Skip to content

Commit 36eb0fc

Browse files
authored
Fix Std.is() deprecation warnings with Haxe 4.2 (#101)
1 parent 53b9e22 commit 36eb0fc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hscript/Interp.hx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
package hscript;
2323
import haxe.PosInfos;
2424
import hscript.Expr;
25+
import haxe.Constraints.IMap;
2526

2627
private enum Stop {
2728
SBreak;
@@ -484,8 +485,8 @@ class Interp {
484485
case EBinop("=>", eKey, eValue): {
485486
var key:Dynamic = expr(eKey);
486487
var value:Dynamic = expr(eValue);
487-
isAllString = isAllString && Std.is(key, String);
488-
isAllInt = isAllInt && Std.is(key, Int);
488+
isAllString = isAllString && (key is String);
489+
isAllInt = isAllInt && (key is Int);
489490
isAllObject = isAllObject && Reflect.isObject(key);
490491
isAllEnum = isAllEnum && Reflect.isEnumValue(key);
491492
keys.push(key);
@@ -647,7 +648,7 @@ class Interp {
647648
}
648649

649650
inline function isMap(o:Dynamic):Bool {
650-
return Std.is(o, haxe.Constraints.IMap);
651+
return (o is IMap);
651652
}
652653

653654
inline function getMapValue(map:Dynamic, key:Dynamic):Dynamic {

0 commit comments

Comments
 (0)