the stack trace of an assertion error does not have a line number.
Here is my stack trace:
Caught: java.lang.AssertionError: [precondition] In method <accelerate(increase:java.lang.Object)> violated. Expression: $preconditionClosure.call()
at gcontracts.Rocket.accelerate(Rocket.groovy)
at gcontracts.BadRocket.run(BadRocket.groovy:7)
See how Rocket.groovy has no line number?
I think your synthesized AssertionStatement nodes should carry the same line numbers as the @Requires annotation. I think you are probably forgetting to fill it in.
the stack trace of an assertion error does not have a line number.
Here is my stack trace:
Caught: java.lang.AssertionError: [precondition] In method <accelerate(increase:java.lang.Object)> violated. Expression: $preconditionClosure.call() at gcontracts.Rocket.accelerate(Rocket.groovy) at gcontracts.BadRocket.run(BadRocket.groovy:7)
See how Rocket.groovy has no line number?
I think your synthesized AssertionStatement nodes should carry the same line numbers as the @Requires annotation. I think you are probably forgetting to fill it in.