-
Notifications
You must be signed in to change notification settings - Fork 106
Wrong context variable taken by gsl #145
Comments
I'm not quite clear what the error is here, that is, the behaviour is exactly what I would expect - when no scope is specified, GSL retrieves attributes from the innermost scope that defines an attribute with the specified name. Defining primalCall without an explicit scope in the function generateExpression causes the attribute to be defined in the function's scope, from where it is then retrieved in the following lines. However:
I took the definition of primalCall out of curFunction and did not receive any error. Instead I got the output I would expect:
Could give a more precise explanation of what you expect, what you receive, and where the two differ? |
That is wired. I just checked if I have the newest version, which is the case. I did the following:
The result in error.hpp is:
So the second line is wrong. I would expect it to be the same as the first line. GSL seems to insert for |
If have the setup that I create an additional attribute 'primalCall' on my nodes in the statup of the script:
In the function that I call to generate the code, I have the same value as an local variable:
The output of gsl is now:
So the xml attribute 'primalCall' is not taken. Instead gls takes the value of the lokal variable 'primalCall'.
It is probably just an return error because if 'curFunction' does not have the attribute 'primalCall' then an error is generated, that such attribute does not exist.
I have attached the xml and gls file. The generation is done with:
I could not upload the files so here they are in plain text:
contextError.gsl
def.xml
The text was updated successfully, but these errors were encountered: