Skip to content

Commit

Permalink
sccharts: Added error message for unsupported signals in classes
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sr committed Dec 12, 2024
1 parent aef4cd4 commit 9006cd3
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import de.cau.cs.kieler.kexpressions.extensions.KExpressionsDeclarationExtension
import de.cau.cs.kieler.kexpressions.extensions.KExpressionsValuedObjectExtensions
import de.cau.cs.kieler.kexpressions.keffects.Emission
import de.cau.cs.kieler.kexpressions.keffects.extensions.KEffectsExtensions
import de.cau.cs.kieler.kexpressions.kext.ClassDeclaration
import de.cau.cs.kieler.kexpressions.kext.extensions.KExtDeclarationExtensions
import de.cau.cs.kieler.kicool.kitt.tracing.Traceable
import de.cau.cs.kieler.sccharts.Action
Expand Down Expand Up @@ -129,7 +130,13 @@ class Signal extends SCChartsProcessor implements Traceable {
val allSignals = state.signals.toList
allSignals.setDefaultTrace

// !!!CHANGED
if (state.declarations.exists[it instanceof ClassDeclaration]) {
for (classDecl : state.declarations.filter(ClassDeclaration)) {
if (classDecl.allNestedValuedObjects.exists[it.isSignal]) {
environment.errors.add("Signals in class declarations not yet supported", classDecl)
}
}
}
if (allSignals.nullOrEmpty) {
return
}
Expand Down

0 comments on commit 9006cd3

Please sign in to comment.