From 93a8027e4f930cf6c4f49c5ad98e56979ca31795 Mon Sep 17 00:00:00 2001 From: Dima Granetchi Date: Mon, 6 Feb 2023 18:15:20 +0200 Subject: [PATCH] Resolve deprecation warning in Haxe 4.2+ (#33) additional fixes for already merged pr https://github.com/vshaxe/hxcpp-debugger/pull/28 --- hxcpp-debug-server/hxcpp/debug/jsonrpc/VariablesPrinter.hx | 2 +- hxcpp-debug-server/hxcpp/debug/jsonrpc/eval/Interp.hx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hxcpp-debug-server/hxcpp/debug/jsonrpc/VariablesPrinter.hx b/hxcpp-debug-server/hxcpp/debug/jsonrpc/VariablesPrinter.hx index 1c8863f..9e9d03a 100644 --- a/hxcpp-debug-server/hxcpp/debug/jsonrpc/VariablesPrinter.hx +++ b/hxcpp-debug-server/hxcpp/debug/jsonrpc/VariablesPrinter.hx @@ -207,7 +207,7 @@ class VariablesPrinter { case TClass(Array): "Array"; case TClass(c): getClassName(c); case TObject: - if (Std.is(value, Class)) { + if (Std.isOfType(value, Class)) { getClassName(cast value); } "Anonymous"; diff --git a/hxcpp-debug-server/hxcpp/debug/jsonrpc/eval/Interp.hx b/hxcpp-debug-server/hxcpp/debug/jsonrpc/eval/Interp.hx index 96e5dad..8cc41cb 100644 --- a/hxcpp-debug-server/hxcpp/debug/jsonrpc/eval/Interp.hx +++ b/hxcpp-debug-server/hxcpp/debug/jsonrpc/eval/Interp.hx @@ -398,8 +398,8 @@ class Interp { case EBinop("=>", eKey, eValue): { var key:Dynamic = expr(eKey); var value:Dynamic = expr(eValue); - isAllString = isAllString && Std.is(key, String); - isAllInt = isAllInt && Std.is(key, Int); + isAllString = isAllString && Std.isOfType(key, String); + isAllInt = isAllInt && Std.isOfType(key, Int); isAllObject = isAllObject && Reflect.isObject(key); isAllEnum = isAllEnum && Reflect.isEnumValue(key); keys.push(key);