Skip to content

Commit

Permalink
initial support for completion for type parameters with anonymous str…
Browse files Browse the repository at this point in the history
…uctures with merged/inherited structures `<T:A & B>`
  • Loading branch information
m0rkeulv committed Jan 7, 2024
1 parent 0208a97 commit 545f5c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.4.22
* Added: Support for resolving & completion for typeParameters with anonymous structures.
* Improvement: better handling of import statements with aliases.
* Misc NPE fixes.


## 1.4.21
* Added: Support for comment line/block command in HXML files
* Improvement: Attempt at restoring `Member pull up` refactoring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ public static List<HaxeNamedComponent> getNamedSubComponents(HaxeClass haxeClass
final HaxeAnonymousTypeFieldList typeFieldList = anonymousTypeBody.getAnonymousTypeFieldList();
if (typeFieldList != null) {
result.addAll(typeFieldList.getAnonymousTypeFieldList());
}else {
result.addAll(anonymousTypeBody.getMethodDeclarationList());
result.addAll(anonymousTypeBody.getFieldDeclarationList());
result.addAll(anonymousTypeBody.getOptionalFieldDeclarationList());
}
body = anonymousTypeBody;
}
Expand Down Expand Up @@ -899,7 +903,7 @@ public static HaxeResolveResult tryResolveType(HaxeType type,
haxeClass = HaxeTypeParameterMultiType.withTypeList(resolve.getNode(), List.of(haxeType));
}
else if (anonymousType != null) {
haxeClass = HaxeTypeParameterMultiType.withAnonymousList(resolve.getNode(), anonymousType.getAnonymousTypeBodyList());
haxeClass = anonymousType;
}
}
}
Expand Down

0 comments on commit 545f5c1

Please sign in to comment.