Skip to content

Commit 1ba3d71

Browse files
authored
Update haxe, fix null safety issues (#127)
1 parent 909d4a9 commit 1ba3d71

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.haxerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"version": "15abdcc",
2+
"version": "b537e99",
33
"resolveLibs": "scoped"
44
}

src/haxeLanguageServer/features/haxe/codeAction/diagnostics/AddTypeHintActions.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class AddTypeHintActions {
155155
return action;
156156
final range = if (isFunName) {
157157
// add return type hint
158-
final pOpen = defToken.access().firstOf(POpen).token ?? return action;
158+
final pOpen = defToken.access().firstOf(POpen)?.token ?? return action;
159159
final pos = pOpen.getPos();
160160
document.rangeAt(pos.max, pos.max, Utf8);
161161
} else {

src/haxeLanguageServer/features/haxe/codeAction/diagnostics/MissingArgumentsAction.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ class MissingArgumentsAction {
141141
case AnonymousStructure:
142142
return "obj";
143143
case ClassField:
144-
return item.args!.field!.name ?? "arg";
144+
return item.args?.field?.name ?? "arg";
145145
case Expression:
146146
if (item.type!.kind == TFun)
147147
return "callback";
148148
case _:
149-
return item.args!.name ?? "arg";
149+
return item.args?.name ?? "arg";
150150
}
151151
return genArgNameFromJsonType(item.type);
152152
}

0 commit comments

Comments
 (0)