Skip to content

Commit

Permalink
honoring NoUsing meta when resolving extension methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rkeulv committed Feb 15, 2024
1 parent 2ffa3bc commit d3e50c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,8 @@ private List<? extends PsiElement> resolveChain(HaxeReference lefthandExpression
for (int i = usingModels.size() - 1; i >= 0; --i) {
foundMethod = usingModels.get(i)
.findExtensionMethod(identifier, leftExpression.getSpecificClassReference(reference, leftExpression.getGenericResolver()));
if (null != foundMethod) {
if (null != foundMethod && !foundMethod.HasNoUsingMeta()) {

reference.putUserData(isExtensionKey, true);
if (log.isTraceEnabled()) log.trace("Found method in 'using' import: " + foundMethod.getName());
return asList(foundMethod.getBasePsi());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,5 +244,9 @@ public HaxeGenericResolver getGenericResolver(HaxeGenericResolver parentResolver
}
return resolver;
}

public boolean HasNoUsingMeta() {
return HaxeMetadataUtils.hasMeta(getBasePsi(), HaxeMeta.NO_USING);
}
}

0 comments on commit d3e50c6

Please sign in to comment.