close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 21 years ago

Closed 21 years ago

Last modified 18 years ago

#145 closed defect (fixed)

Inposible to re-assing local variables.

Reported by: Lander Ibarra Iriondo Owned by: danirus
Priority: highest Milestone:
Component: Various Version: head
Severity: blocker Keywords:
Cc:

Description

Show the next code lines.

Compile this code lines with TOL-Base y2004m05d28

Text Output = "";
Text (Output := "f");

Serie Sr = {
Text (Output := "hola");
Serie Output = CalInd(WD(6), Mensual)
};

All code lines work. No warning messages, no errors.

Compile this code lines with TOL-Base Snap.

Text Output = "";
Text (Output := "f");
I show the warning
Serie Sr = {
Text (Output := "hola");
Serie Output = CalInd(WD(6), Mensual)
};
I can´t compile. I show this error message. "ERROR: Sr could not be created".

I think that I can´t reassing a local variable into
the encapsuled code, but the reassingnement of a
global variable is possible. Why works into TOLBase (y2004m05d28)
and not into TolBase Snap???

Change History (3)

comment:1 Changed 21 years ago by danirus

Status: newassigned

comment:2 Changed 21 years ago by danirus

Resolution: fixed
Status: assignedclosed

This bug has been resolved.

The problem was an "out of scope" operation in Tol Evaluator.
When the Evaluator adds a possible orphan object to the stack must be sure of that
its level_ attribute (its scope) is greater than the current level_ (current scope).

In this case, the scope of the object is the global scope.
Tol Evaluator must ensure itself that a given object is an orphan object. Only an
object that comes from a more deeply local scope could be an orphan object.

comment:3 Changed 18 years ago by Víctor de Buen Remiro

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000100
Note: See TracTickets for help on using tickets.