compiler: fix lack of method name in interface matching

This is required for correctly differentiating between interface types.
This commit is contained in:
Ayke van Laethem
2021-03-24 01:21:53 +01:00
committed by Ron Evans
parent 5d334922d7
commit c5ec955081
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -186,7 +186,7 @@ func getTypeCodeName(t types.Type) string {
case *types.Interface:
methods := make([]string, t.NumMethods())
for i := 0; i < t.NumMethods(); i++ {
methods[i] = getTypeCodeName(t.Method(i).Type())
methods[i] = t.Method(i).Name() + ":" + getTypeCodeName(t.Method(i).Type())
}
return "interface:" + "{" + strings.Join(methods, ",") + "}"
case *types.Map: