Parameterized attributes aren't fully flushed when using the `--lazyMaps` option

Issue #276 resolved
Axel Mårtensson created an issue

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)

  1. Jesper Öqvist

    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...

  2. Log in to comment