Browse Source

Fix an error in call argument processing.

Stan Hebben 6 years ago
parent
commit
74bcf27227

+ 2
- 1
Parser/src/main/java/org/openzen/zenscript/parser/expression/ParsedCallArguments.java View File

@@ -126,8 +126,9 @@ public class ParsedCallArguments {
126 126
 		if (candidates.size() == 1) {
127 127
 			innerScope = scope.forCall(candidates.get(0));
128 128
 		} else {
129
+			int givenTypeArguments = typeArguments == null ? 0 : typeArguments.length;
129 130
 			candidates = candidates.stream()
130
-					.filter(candidate -> candidate.getNumberOfTypeParameters() == 0)
131
+					.filter(candidate -> candidate.getNumberOfTypeParameters() == givenTypeArguments)
131 132
 					.collect(Collectors.toList());
132 133
 			
133 134
 			if (candidates.isEmpty()) {

Loading…
Cancel
Save