#37 ✓resolved
Evgeny Goldin

ClassCastException: o.c.g.a.e.ClosureExpression cannot be cast to o.c.g.a.e.ClassExpression

Reported by Evgeny Goldin | February 20th, 2012 @ 12:00 PM | in 1.2.6

@Ensures({ result })
abstract List<String> sources()

causes

java.lang.ClassCastException: org.codehaus.groovy.ast.expr.ClosureExpression cannot be cast to org.codehaus.groovy.ast.expr.ClassExpression
    at org.gcontracts.generation.BaseGenerator.addCallsToSuperMethodNodeAnnotationClosure(BaseGenerator.java:145)
    at org.gcontracts.generation.PostconditionGenerator.generateDefaultPostconditionStatement(PostconditionGenerator.java:91)
    at org.gcontracts.common.impl.lc.PostconditionLifecycle.generatePostcondition(PostconditionLifecycle.java:66)
    at org.gcontracts.common.impl.lc.PostconditionLifecycle.afterProcessingMethodNode(PostconditionLifecycle.java:56)
    at org.gcontracts.ast.visitor.LifecycleAfterTransformationVisitor.visitClass(LifecycleAfterTransformationVisitor.java:70)
    at org.gcontracts.ast.GContractsASTTransformation.visit(GContractsASTTransformation.java:111)
    at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:302)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:843)
    ... 30 more

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

core module

Shared Ticket Bins

People watching this ticket

Attachments

Pages