Internal compiler error when calling a primitive with a list-var as argument
When I call a primitive like this
prim("SPX_interpreter_introspect_strategies", strat*)
, it triggers an internal compiler error:
compile-to-ctree:
[exec] [ strc | info ] Compiling ‘src/main/stratego/spoofax/interpreter/frontend.str’
[exec] error: cannot type ListVar(““)
[exec] inferred types of subterms:
[exec] typed "" as EmptyId, ID, UCID, LCID, Id, ModName, String, Real, Int,
[exec] [ strc | info ] abstract syntax in ‘target/share/frontend.sci.fe-cong.Stratego-Core’
[exec] [ strc | info ] concrete syntax in ‘target/share/frontend.sci.fe-cong.Stratego-Core.txt’
[exec] [ strc | critical ] file /tmp/StrategoXTNCzOTadoes not satisfy format Stratego-Core
[exec] This indicates a bug in the compiler
[exec] Please notify stratego-bugs@cs.uu.nl
[exec] FILE(”/tmp/StrategoXTNCzOTa”)The same code compiles fine after renaming
strat*
tostrats
.EDIT: minimal example code that triggers the ICE:
module test
strategies
main = ?x*; prim(“bar”, x*)Submitted by Tobi Vollebregt on 2 March 2012 at 13:24
$ strc -i test.str
[ strc | info ] Compiling ‘test.str’
error: cannot type ListVar(““)
inferred types of subterms:
typed "" as EmptyId, ID, UCID, LCID, Id, ModName, String, Real, Int,
[ strc | info ] abstract syntax in ‘test.sci.fe-cong.Stratego-Core’
[ strc | info ] concrete syntax in ‘test.sci.fe-cong.Stratego-Core.txt’
[ strc | critical ] file /tmp/StrategoXTiAcuAidoes not satisfy format Stratego-Core
This indicates a bug in the compiler
Please notify stratego-bugs@cs.uu.nl
FILE(”/tmp/StrategoXTiAcuAi”)
Issue Log
Sounds like another missing desugaring rule.
This is in the actual compiler though (strc), though indeed its probably a missing desugaring rule.
Log in to post comments