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

Key: BOO-1009
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Cedric Vivier
Reporter: Cedric Vivier
Votes: 0
Watchers: 0
Operations

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

Explicit interface property implementation uses 'implicit' implementation when there is one.

Created: 12/May/08 07:18 AM   Updated: 12/May/08 08:58 AM
Component/s: None
Affects Version/s: 0.8.1
Fix Version/s: 0.8.2

Time Tracking:
Not Specified

Testcase included: yes


 Description  « Hide
The assert in the following code fails :
interface IInterface:
        Property as bool:
                get

class ExplicitImplementation(IInterface):
        Property:
                get:
                        return false
        IInterface.Property:
                get:
                        return true


t as IInterface = ExplicitImplementation()
assert t.Property

It obviously should not fail, Boo currently generates the following IL for code above :

.property bool Property ()
        {
                .get instance default bool ExplicitImplementation::get_Property () 
        }
        .property specialname rtspecialname bool IInterface.Property ()
        {
                .get instance default bool ExplicitImplementation::get_Property () 
        }

Problem is that the explicit interface implementation uses the 'implicit' implementation when there is one available.

If there is only explicit interface implementations there is no problem (each explicit impl uses its own impl) :

.property specialname rtspecialname bool IInterface.Property ()
        {
                .get instance default bool ExplicitImplementation::IInterface.get_Property () 
        }
        .property specialname rtspecialname bool IInterface2.Property ()
        {
                .get instance default bool ExplicitImplementation::IInterface2.get_Property () 
        }


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Cedric Vivier - 12/May/08 08:58 AM
fixed in r. 2936