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

#148 closed defect (fixed)

For returned type wrong parsed?

Reported by: Alfredo Torre Owned by: danirus
Priority: normal Milestone:
Component: Kernel Version: 1.1.1
Severity: normal Keywords:
Cc:

Description

Compile this piece of code and see log file and compare results:

WriteLn("a1... OK");
Set a1 = For(1, 2, Text(Real n) { SetOfReal(n) });
WriteLn("a2... good result but confusing ERROR text");
Set a2 = For(1, 2, Text(Real n) { Set SetOfReal(n) });
WriteLn("a2... BAD result NO error text");
Set a3 = For(1, 2, Text(Real n) { Set ss = SetOfReal(n) });

Change History (7)

comment:1 Changed 21 years ago by manuelb

Owner: changed from danirus to manuelb

comment:2 Changed 21 years ago by manuelb

Status: newassigned

comment:3 Changed 21 years ago by Jorge

there is also a related code

Text x = {Real a = 1.0}

comment:4 Changed 21 years ago by danirus

Owner: changed from manuelb to danirus
Status: assignednew

I take this bug. Manu is so busy working a lot for a migration project.

comment:5 Changed 21 years ago by danirus

Status: newassigned

comment:6 Changed 21 years ago by danirus

Resolution: fixed
Status: assignedclosed

This bug has been resolved.
Before update, as Jorge told us, you can try to execute code like:

Text x = { Real a = 1.0 }


But there are more fantastic examples:

Polyn p = { TimeSet ts = WD(3) }
Matrix m = { Polyn p = 1-B }


And more...

The problem was related with the number of sentences inside a declared local
scope. In all this cases we have only one sentence. All the times that we were
using only one sentence inside a local scope, and when this sentence was a
function declaration (a little bit complicated in a real code) or an assignment
sentence (more frequently used) the problem appeared.

Now, the Evaluation Engine ensures itself of this possibility to avoid it.

comment:7 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_000148
Note: See TracTickets for help on using tickets.