interp: fix litteral map containing binary functions

The case of assigning a binary function to a funcT object was
solved elsewhere. Factor the case in genDestValue to apply it
at multiple places.

Fixes #1100.
This commit is contained in:
Marc Vertes
2021-05-27 12:04:11 +02:00
committed by GitHub
parent 29e912e90b
commit c86436afa6
4 changed files with 42 additions and 65 deletions

View File

@@ -1723,7 +1723,7 @@ func isInterfaceSrc(t *itype) bool {
}
func isInterfaceBin(t *itype) bool {
return t.cat == valueT && t.rtype.Kind() == reflect.Interface
return t.cat == valueT && t.rtype.Kind() == reflect.Interface || t.cat == errorT
}
func isInterface(t *itype) bool {