Renaming functions in Statix fails
The Spoofax > refactoring > rename action fails
To reproduce
I’m using the following file as an example, but I haven’t been able to rename functions in Statix tests and regular Statix files
resolve {res} res == test(4) rules test : int -> int test(i) = i.
Select
test
by double clicking. (any of the instances of the word ‘test’ fail)
Spoofax > Refactoring > rename
Enter the new name ‘simple’Error: renaming impossible
The selected name cannot be renamed:
InductiveC{TermIndex(“sandbox/renaming.stxtest”,18)}Error in the console:
13:42 | ERROR | o.m.s.e.t.TransformJob - Transformation failed for eclipse:///lang/sandbox/renaming.stxtest org.metaborg.core.transform.TransformException: Invoking Stratego strategy rename-menu-action failed at org.metaborg.spoofax.core.transform.StrategoTransformer.transform(StrategoTransformer.java:168) at org.metaborg.spoofax.core.transform.StrategoTransformer.transform(StrategoTransformer.java:86) at org.metaborg.spoofax.core.transform.StrategoTransformer.transform(StrategoTransformer.java:1) at org.metaborg.core.transform.TransformService.transform(TransformService.java:88) at org.metaborg.spoofax.eclipse.transform.TransformJob.transform(TransformJob.java:145) at org.metaborg.spoofax.eclipse.transform.TransformJob.transformAll(TransformJob.java:120) at org.metaborg.spoofax.eclipse.transform.TransformJob.run(TransformJob.java:80) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Renaming does work when selecting any of the
res
and renaming toresult
System info:
Submitted by Ivo Wilms on 5 July 2021 at 15:15
Eclipse: org.eclipse.platform.ide 4.16.0.I20200604-0540
Spoofax: org.metaborg.spoofax.eclipse 2.6.0.20210526-183432-master
System: Mac OS X x86_64 10.14.6
Log in to post comments