Parameterized circular attributes fail in case of incremental evaluation

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

When defining a circular attribute with at least one parameter, its evaluation always results in a thrown NullPointerException if incremental evaluation is activated. The problem is a lookup of a HashMap mapping parameters to handlers, which is never filled, thus returning null.

Comments (3)

  1. Jesper Öqvist

    I have added a minimal test for this issue (adopted from the example you provided in email) to the regression test suite as incremental/param/Test137. Here is the stack trace when running with JastAdd 2.3.2-36-gcecdd6df:

        [junit] [FAIL] runTest[incremental/param/Test137 - 2 - incremental=param rewrite=cnta](tests.jastadd2.TestShouldPass)                    
        [junit] Code execution failed when expected to pass:              
        [junit] Exception in thread "main" java.lang.NullPointerException 
        [junit]     at ASTState.enterAttrStoreEval(ASTState.java:275)     
        [junit]     at Root.circular_parameterized(Root.java:412)         
        [junit]     at Test.main(Test.java:13)   
    

    The test case is here.

  2. Log in to comment