Skip to content

Commit 343c032

Browse files
FrottyCopilot
andauthored
Update de.peeeq.wurstscript/src/main/java/de/peeeq/wurstscript/validation/WurstValidator.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent bed57ac commit 343c032

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

de.peeeq.wurstscript/src/main/java/de/peeeq/wurstscript/validation/WurstValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ private void checkImplicitParameter(NameRef e) {
917917
private void checkTypeParameters(AstElementWithTypeParameters e) {
918918
for (TypeParamDef ta : e.getTypeParameters()) {
919919
String name = ta.getName();
920-
if (name.indexOf('<') >= 0 || (!name.isEmpty() && name.charAt(0) == '#')) {
920+
if (name.isEmpty() || name.charAt(0) == '#' || name.indexOf('<') >= 0) {
921921
ta.addError("Type parameter must be a simple name ");
922922
} else {
923923
checkTypeName(ta, name);

0 commit comments

Comments
 (0)