namespace resolver: fix fail on anonimous class

This commit is contained in:
z7zmey 2018-04-10 20:32:01 +03:00
parent ac135f132d
commit 0b37dd6dbf

View File

@ -73,7 +73,9 @@ func (nsr *NamespaceResolver) EnterNode(w walker.Walkable) bool {
nsr.ResolveName(interfaceName, "") nsr.ResolveName(interfaceName, "")
} }
if n.ClassName != nil {
nsr.AddNamespacedName(n, n.ClassName.(*node.Identifier).Value) nsr.AddNamespacedName(n, n.ClassName.(*node.Identifier).Value)
}
case *stmt.Interface: case *stmt.Interface:
for _, interfaceName := range n.Extends { for _, interfaceName := range n.Extends {