Skip to content

Commit

Permalink
VB: fix hash-map equality.
Browse files Browse the repository at this point in the history
  • Loading branch information
kanaka committed Nov 19, 2015
1 parent 028012e commit 1f8c4c8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions vb/types.vb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ namespace Mal
End If
Next
return True
Else If TypeOf a Is MalHashMap Then
Dim ahm As Dictionary(Of String,MalVal) = DirectCast(a,MalHashMap).getValue()
Dim bhm As Dictionary(Of String,MalVal) = DirectCast(b,MalHashMap).getValue()
For Each key As String in ahm.keys
If not bhm.ContainsKey(key) Then
return False
End If
If not _equal_Q(DirectCast(a,MalHashMap).getValue()(key),
DirectCast(b,MalHashMap).getValue()(key))
return False
End If
Next
return True
Else
return a Is b
End If
Expand Down

0 comments on commit 1f8c4c8

Please sign in to comment.