diff --git a/src/common/com/intellij/plugins/haxe/lang/psi/impl/HaxeReferenceImpl.java b/src/common/com/intellij/plugins/haxe/lang/psi/impl/HaxeReferenceImpl.java index fb72e942c..2111fdb53 100644 --- a/src/common/com/intellij/plugins/haxe/lang/psi/impl/HaxeReferenceImpl.java +++ b/src/common/com/intellij/plugins/haxe/lang/psi/impl/HaxeReferenceImpl.java @@ -639,10 +639,13 @@ private HaxeClassResolveResult resolveHaxeClassInternal() { HaxeTypeList list = listPart.getTypeList(); if(list != null) { list.getTypeListPartList(); - List classReferences = list.getTypeListPartList().stream() - .map(part -> part.getTypeOrAnonymous() == null ? null : part.getTypeOrAnonymous().getType()) - .filter(Objects::nonNull) - .collect(Collectors.toList()); + List classReferences = new ArrayList<>(); + for (HaxeTypeListPart part : list.getTypeListPartList()) { + HaxeType type = part.getTypeOrAnonymous() == null ? null : part.getTypeOrAnonymous().getType(); + if (type != null) { + classReferences.add(type); + } + } HaxeTypeParameterMultiType constraint = new HaxeTypeParameterMultiType(listPart.getContext().getNode(), classReferences); return HaxeClassResolveResult.create(constraint);