Ticket #15 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

as_dictionary/2 from dictionaryp not implemented in bintree

Reported by: victor Owned by: pmoura
Priority: major Milestone: Logtalk distribution
Component: library Version: 2.31.5
Keywords: Cc:

Description

Hello,

I was trying to use dictionaries, and found that bintree was the only implementing library for it.

But it looks like as_dictionary/2 is not implemented in bintree.

Maybe there is there a better way to manipulate key-value map ?

Attachments

Change History

Changed 4 months ago by pmoura

  • status changed from new to assigned
  • owner set to pmoura

Changed 4 months ago by pmoura

  • status changed from assigned to closed
  • resolution set to fixed

Thanks for the bug report. The problem should be fixed in r4286.

Changed 4 months ago by victor

  • status changed from closed to reopened
  • resolution deleted

Sorry to bother you again for this, but there is still something strange, and I think it is the empty/1 predicate implemented in bintree with a "==" instead of a "=".

See what happens when calling as_dictionary/2 :

    Rule: as_dictionary([me-seller1, it-buyer1, proposition-high_price, product-bottle], _G562) ?  
    Call: empty(_G615) ?  
    Rule: empty(_G615) ?  
    Call: _G615==t ?  
    Fail: _G615==t ?  
    Fail: empty(_G615) ?  
    Fail: bintree::as_dictionary([me-seller1, it-buyer1, proposition-high_price, product-bottle], _G562) ?  

Changed 4 months ago by pmoura

  • status changed from reopened to closed
  • resolution set to fixed

Oops! We need to call new/1 (to create a new, initially empty tree), not empty/1 (which just tests if an existing tree is empty)! This silly mistake is fixed in r4288.

Add/Change #15 (as_dictionary/2 from dictionaryp not implemented in bintree)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.