diff --git a/.haxerc b/.haxerc index 0ea2bfb4..5b42a905 100644 --- a/.haxerc +++ b/.haxerc @@ -1,4 +1,4 @@ { - "version": "15abdcc", + "version": "b537e99", "resolveLibs": "scoped" } diff --git a/src/haxeLanguageServer/features/haxe/codeAction/diagnostics/AddTypeHintActions.hx b/src/haxeLanguageServer/features/haxe/codeAction/diagnostics/AddTypeHintActions.hx index a0c91ff5..b626a980 100644 --- a/src/haxeLanguageServer/features/haxe/codeAction/diagnostics/AddTypeHintActions.hx +++ b/src/haxeLanguageServer/features/haxe/codeAction/diagnostics/AddTypeHintActions.hx @@ -155,7 +155,7 @@ class AddTypeHintActions { return action; final range = if (isFunName) { // add return type hint - final pOpen = defToken.access().firstOf(POpen).token ?? return action; + final pOpen = defToken.access().firstOf(POpen)?.token ?? return action; final pos = pOpen.getPos(); document.rangeAt(pos.max, pos.max, Utf8); } else { diff --git a/src/haxeLanguageServer/features/haxe/codeAction/diagnostics/MissingArgumentsAction.hx b/src/haxeLanguageServer/features/haxe/codeAction/diagnostics/MissingArgumentsAction.hx index e71b8ce6..73b7f2db 100644 --- a/src/haxeLanguageServer/features/haxe/codeAction/diagnostics/MissingArgumentsAction.hx +++ b/src/haxeLanguageServer/features/haxe/codeAction/diagnostics/MissingArgumentsAction.hx @@ -141,12 +141,12 @@ class MissingArgumentsAction { case AnonymousStructure: return "obj"; case ClassField: - return item.args!.field!.name ?? "arg"; + return item.args?.field?.name ?? "arg"; case Expression: if (item.type!.kind == TFun) return "callback"; case _: - return item.args!.name ?? "arg"; + return item.args?.name ?? "arg"; } return genArgNameFromJsonType(item.type); }