diff --git a/pkl-core/src/main/java/org/pkl/core/runtime/PowerAssertions.java b/pkl-core/src/main/java/org/pkl/core/runtime/PowerAssertions.java index 1593b513..bd054639 100644 --- a/pkl-core/src/main/java/org/pkl/core/runtime/PowerAssertions.java +++ b/pkl-core/src/main/java/org/pkl/core/runtime/PowerAssertions.java @@ -30,7 +30,6 @@ import java.util.List; import java.util.Map; import java.util.function.Consumer; import java.util.stream.Collectors; -import org.pkl.core.PklBugException; import org.pkl.core.ast.ConstantValueNode; import org.pkl.core.ast.expression.member.InferParentWithinMethodNode; import org.pkl.core.ast.expression.member.InferParentWithinObjectMethodNode; @@ -84,10 +83,7 @@ public class PowerAssertions { SourceSection sourceSection, Map> trackedValues, @Nullable Consumer firstFrameSuffix) { - if (!sourceSection.isAvailable()) { - throw new PklBugException("Power assertions require an available source section"); - } - + assert sourceSection.isAvailable() : "Power assertions require an available source section"; out.appendSandboxed( () -> { var lines = lines(sourceSection);