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

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

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

Boo doesn't check for inherited indexers early enough

Created: 19/Apr/06 02:50 PM   Updated: 19/Apr/06 03:58 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 0.7.6

Time Tracking:
Not Specified

Issue Links:
Related
 


 Description  « Hide
Encountered by F Geiger ( http://groups.google.com/group/boolang/browse_thread/thread/2d0fd0beeb0d5671/a4e22c3bd8371cd1#a4e22c3bd8371cd1 )

rwar1 has an indexer.

rwar2 derives from rwar1 and thus inherits rwar1's indexer.

However, if source code using rwar2 is visited before information about rwar2 and rwar1 has been collected, then Boo doesn't know that rwar2 has inherited an indexer from rwar1. This results in incorrect compiler errors.

RWAR1.BOO
class rwar1:
"""Description of rwar1"""
def constructor():
pass
self[i as int]:
get:
return 0
set:
pass

RWAR2.BOO
class rwar2(rwar1):
"""Description of rwar2"""
def constructor():
pass

RWARTEST.BOO
class rwartest:
"""Description of rwartest"""
def constructor():
pass

y = rwar2()
y[0]

CONSOLE COMMANDS USED – note the order i pass in files seems to be the order boo visits classes***
D:\Boo\boo\trunk\bin\net-2.0>booc -r:mapack -r:boo.lang.useful -t:library d:\temp\strangething\rwartest.boo d:\temp\StrangeThing\rwar1.boo d:\temp\StrangeThing\rwar2.boo
Boo Compiler version 0.7.6.2204 (CLR v2.0.50727.42)
d:\temp\strangething\rwartest.boo(11,1): BCE0048: Type 'StrangeThing.rwar2' does
not support slicing.
1 error(s).

D:\Boo\boo\trunk\bin\net-2.0>booc -r:mapack -r:boo.lang.useful -t:library d:\temp\StrangeThing\rwar1.boo d:\temp\StrangeThing\rwar2.boo d:\temp\strangething\rwartest.boo
Boo Compiler version 0.7.6.2204 (CLR v2.0.50727.42)

(compile worked)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Arron Washington - 19/Apr/06 02:51 PM
(ugh, I wish JIRA would format things nicer.)

Rodrigo B. de Oliveira - 19/Apr/06 03:58 PM
Thanks for the report!