Parameterized attributes aren't fully flushed when using the `--lazyMaps` option
Issue #276
resolved
When compiling a JastAdd project with the --lazyMaps
option. the following code gets generated for flushing the attribute caches of a parameterized attribute:
/** @apilevel internal */
private void hasPackage_String_reset() {
hasPackage_String_computed = new java.util.HashMap(4);
hasPackage_String_values = null;
}
The problem here is that the _computed
-hashmap isn't reset to null
, what we want is instead:
/** @apilevel internal */
private void hasPackage_String_reset() {
hasPackage_String_computed = null;
hasPackage_String_values = null;
}
I have submitted a fix in pull request #4
Comments (3)
-
-
I have added a test for this issue in the regression test suite:
flush/cycle01
-
- changed status to resolved
Fix merged
- Log in to comment
I can't think of a regression test for this that isn't very implementation-specific.
Not sure if I would like to add an implementation specific test for it nor not...