#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
| Owner: | changed from danirus to manuelb | 
|---|
comment:2 Changed 21 years ago by
| Status: | new → assigned | 
|---|
comment:3 Changed 21 years ago by
comment:4 Changed 21 years ago by
| Owner: | changed from manuelb to danirus | 
|---|---|
| Status: | assigned → new | 
I take this bug. Manu is so busy working a lot for a migration project. 
 
comment:5 Changed 21 years ago by
| Status: | new → assigned | 
|---|
comment:6 Changed 21 years ago by
| Resolution: | → fixed | 
|---|---|
| Status: | assigned → closed | 
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 19 years ago by
| bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000148 | 
|---|


there is also a related code