Closed adrian-thurston closed 4 years ago
self-contained reproduction:
struct structure GD: grammar_def end def grammar_def [level1] def level1 [level2] def level2 [id] token id /[a-z]+/ global S: structure = new structure() S->GD = cons grammar_def "id" for L: level1 in S->GD { L.level2 = cons level2 "hi" } print "[S->GD]
This is a bug only in the sense that the necessary instructions are not implemented. In actuality it should be unchanged because a reference of a non-referencable thing is made. What should be happening is the iterator made constant and the assignment prevented.
Implemented missing instruction in 06fbe467c0b900ce20705ad3b4eb8e8454b4a56e and opened #99 to capture the need to set iterators constant.
The following modification does not work. From genf