History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-585
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Rodrigo B. de Oliveira
Reporter: Rodrigo B. de Oliveira
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

twilight zone bug: closures are processed more than once

Created: 04/Nov/05 05:13 AM   Updated: 04/Nov/05 05:18 AM
Component/s: Compiler
Affects Version/s: 0.7
Fix Version/s: 0.7.5

Time Tracking:
Not Specified


 Description  « Hide
hi,
here's a 'twilight zone' compile bug (happened in sciboo)
2 files,

"""t1.boo"""
def Main(argv as (string)):
Toto.Initialize()

"""t2.boo"""
class Toto:
static def Initialize():
_toto = def(s as string):
refs = s.Split(char(','))
for d in refs:
print d
_toto("abc, def")

_toto2 = def(s as string):
return '_' + s[0:1].ToLower() + s[1:]
print _toto2("Allo")

---------
booc t1.boo t2.boo -output tt.exe
>tt.exe

_allo
>Exit code: 0

----------
comment out the "_toto2" part in t2.boo and we get expected results:
booc t1.boo t2.boo -output tt.exe
>tt.exe
abc
def
>Exit code: 0

------
or, (change order t1,t2 => t2,t1) and we get expected results
booc t2.boo t1.boo -output tt.exe
>tt.exe
abc
def
_allo
>Exit code: 0




 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.