Skip to content

Commit

Permalink
Update haxe, fix null safety issues (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz authored Jul 30, 2024
1 parent 909d4a9 commit 1ba3d71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .haxerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "15abdcc",
"version": "b537e99",
"resolveLibs": "scoped"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 1ba3d71

Please sign in to comment.