Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ public static void printCostumeError(CtElement element, String msg, ErrorEmitter
sb.append(element + "\n\n");
sb.append("Location: " + element.getPosition() + "\n");
sb.append("______________________________________________________\n");
sb.append(sb.toString());
Copy link
Collaborator Author

@rcosta358 rcosta358 Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was duplicating the same error in the output



errorl.addError(s, sb.toString(), element.getPosition(), 1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,19 @@ public void handleStateSetsFromAnnotation(CtElement element) {
}

private void createStateSet(CtNewArray<String> e, int set, CtElement element) {

// if any of the states starts with uppercase, throw error (reserved for alias)
for (CtExpression<?> ce : e.getElements()) {
if (ce instanceof CtLiteral<?>) {
@SuppressWarnings("unchecked")
CtLiteral<String> s = (CtLiteral<String>) ce;
String f = s.getValue();
if (Character.isUpperCase(f.charAt(0))) {
ErrorHandler.printCostumeError(s, "State name must start with lowercase in '" + f + "'", errorEmitter);
}
}
}

Optional<GhostFunction> og = createStateGhost(set, element);
if (!og.isPresent()) {
throw new RuntimeException("Error in creation of GhostFunction");
Expand Down