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

Key: BOO-844
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Avishay Lavie
Reporter: John
Votes: 0
Watchers: 0
Operations

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

can not override property setter

Created: 06/Jul/07 01:52 AM   Updated: 23/Jul/07 02:22 PM
Component/s: Compiler
Affects Version/s: 0.7.8
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File BOO-844-1.patch (5 kb)



 Description  « Hide
There are 2 parts to this bug.

1) The compiler makes an infinite loop by calling self.set_Property(value) instead of super.set_Property(value) in the overridden property setter. See thread http://groups.google.com/group/boolang/browse_thread/thread/f946fad0ac453351 for more information.

2) Compilation fails if the class (or another class) attempts to set the property on an earlier line than the property declaration. See thread See thread http://groups.google.com/group/boolang/browse_thread/thread/5136634864640ea7 for more information.

Here is a test case:

class A:
virtual Kaboom:
get:
return true
set:
pass

class B(A):
//comment out this method to allow compilation and reveal the infinite loop bug
private def CompileKaboom():
self.Kaboom = true

override Kaboom:
get:
return super.Kaboom
set:
super.Kaboom = value



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Avishay Lavie - 20/Jul/07 01:57 PM
Added patch that fixes the infinite loop problem. Can't seem to test it on Mono because nunit-console keeps crashing. Please, kind folks, download this lowly patch, give it a loving home and treat it with the kindness of nunit. When it's all grown up and healthy, it can come look for its daddy.
In other words: tell me if this works.

Avishay Lavie - 20/Jul/07 05:53 PM
Committed first part after testing on Windows.

Avishay Lavie - 23/Jul/07 02:22 PM
Committed second part, resolving issue.