Skip to content

Commit

Permalink
Merge pull request #214 from Eclalang/issue-#211--add-map-to-string
Browse files Browse the repository at this point in the history
add map string
  • Loading branch information
tot0p authored Feb 20, 2024
2 parents dfdd48a + 2106da9 commit cc1f7d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion interpreter/eclaType/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ func (m *Map) Add(value Type) (Type, error) {
for index, v := range value.(*Map).Keys {
m.Set(v, value.(*Map).Values[index])
}

return m, nil
case String:
return m.GetString().Add(value)
case *Any:
return m.Add(value.(*Any).Value)
}
Expand Down

0 comments on commit cc1f7d5

Please sign in to comment.