Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException in top-down visit #2114

Open
jurgenvinju opened this issue Dec 23, 2024 · 0 comments
Open

ClassCastException in top-down visit #2114

jurgenvinju opened this issue Dec 23, 2024 · 0 comments
Assignees

Comments

@jurgenvinju
Copy link
Member

Describe the bug

rascal>toDefaultRec({-276798823r185339102,-173549339r466608811,0})
java.lang.ClassCastException: class io.usethesource.vallang.impl.persistent.List cannot be cast to class io.usethesource.vallang.ISet (io.usethesource.vallang.impl.persistent.List and io.usethesource.vallang.ISet are in unnamed module of loader 'app')
(internal error)
        at $shell$(|main://$shell$|)

java.lang.ClassCastException: class io.usethesource.vallang.impl.persistent.List cannot be cast to class io.usethesource.vallang.ISet (io.usethesource.vallang.impl.persistent.List and io.usethesource.vallang.ISet are in unnamed module of loader 'app')
        at org.rascalmpl.interpreter.TraversalEvaluator.traverseSetOnce(TraversalEvaluator.java:475)
        at org.rascalmpl.interpreter.TraversalEvaluator.traverseOnce(TraversalEvaluator.java:169)

This is triggered with a function like this:

value rewrite(value x) = top-down visit(x) {
   case value z => r(z);
}

value r(set[value] s)= [*s];
default r(value a) = a;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant