diff options
author | Ayke van Laethem <[email protected]> | 2021-03-24 01:21:53 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-03-28 14:00:37 +0200 |
commit | c5ec95508127678ebbd11df8bdcf30d83766a141 (patch) | |
tree | 424bac80d7a9e284a14a5b218c8865b2f41708e0 /compiler/interface.go | |
parent | 5d334922d78ed85e1e83341d2d6262755e043b19 (diff) | |
download | tinygo-c5ec95508127678ebbd11df8bdcf30d83766a141.tar.gz tinygo-c5ec95508127678ebbd11df8bdcf30d83766a141.zip |
compiler: fix lack of method name in interface matching
This is required for correctly differentiating between interface types.
Diffstat (limited to 'compiler/interface.go')
-rw-r--r-- | compiler/interface.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/interface.go b/compiler/interface.go index b4bf4cd0c..ed75b3577 100644 --- a/compiler/interface.go +++ b/compiler/interface.go @@ -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: |