Skip to content

Commit 401961a

Browse files
flofridayJozott00
authored andcommitted
typechecker: Fix enumeration checking
1 parent 763e312 commit 401961a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

vadl-cli/main/vadl/cli/BaseCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public Integer call() {
295295
🔥 The vadl compiler crashed 🔥 \s
296296

297297
This shouldn't have happened, please open an issue with the stacktrace below at:
298-
https://ea.complang.tuwien.ac.at/vadl/open-vadl/issues/new
298+
https://github.com/OpenVADL/open-vadl/issues/new
299299
""");
300300

301301
printDumps("\nBefore the crash, the following dumps were generated:");

vadl/main/vadl/ast/TypeChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,10 @@ public Void visit(EnumerationDefinition definition) {
677677
.build();
678678
}
679679

680-
681680
int nextVal = 0;
682681
for (var entry : definition.entries) {
683682
if (entry.value != null) {
683+
check(entry.value);
684684
nextVal = constantEvaluator.eval(entry.value).value().intValueExact() + 1;
685685
continue;
686686
}

0 commit comments

Comments
 (0)