Implement global interface variable constant

This commit is contained in:
Ayke van Laethem
2018-08-25 02:58:00 +02:00
parent c25b448758
commit 9f2bcfe5e3
3 changed files with 39 additions and 3 deletions
+2 -2
View File
@@ -90,8 +90,8 @@ func (p *Program) AnalyseCallgraph() {
// Find all types that are put in an interface.
func (p *Program) AnalyseInterfaceConversions() {
// Clear, if AnalyseTypes has been called before.
p.typesWithMethods = make(map[string]*InterfaceType)
p.typesWithoutMethods = make(map[string]int)
p.typesWithoutMethods = map[string]int{"interface{}": 0}
p.typesWithMethods = map[string]*InterfaceType{}
for _, f := range p.Functions {
for _, block := range f.fn.Blocks {