Compilation fails for attribute declaration when incremental-debug (+ flush + tracing)

Issue #333 resolved
René Schöne created an issue

There apparently is a small bug when using the "debug" setting for "--incremental" in combination with the other flags I've been using. When used, the same line in "src/template/incremental/Notification.tt" that I've proposed in #332 to change (and that did apparently introduced errors on some other place) again causes some trouble.

It will generate code of the form

state().trace().flushIncAttr(ErroneousType.this, "ivalue", "", "");

inside an anonymous class, which causes the method "trace()" not being found, probably because the method "state()" of the inner class shadows the method of the host class.
My proposal would be to explicitly refer to the outer method by:

--- a/src/template/incremental/Notification.tt
+++ b/src/template/incremental/Notification.tt
@@ -235,7 +235,7 @@ $endif
   #resetCache
   #(signature)_handler.notifyDependencies();
   $if (TraceFlush)
-  state().trace().flushIncAttr($HostClass.this, "#signature", "", "");
+  $HostClass.this.state().trace().flushIncAttr($HostClass.this, "#signature",
"", "");
   $endif
 }
 $endif

I have not checked, if this might make other JastAdd-tests fail.

I'm using the following parameter configuration:
"--flush=full",
"--incremental=param,debug",
"--tracing=cache,flush",

JastAdd version 2.3.4-74-g47d2727 (checked out master)

When removing the "debug" from "--incremental", the error does not occur.

Comments (2)

  1. Log in to comment