diff --git a/pkg/visitor/nsresolver/namespace_resolver.go b/pkg/visitor/nsresolver/namespace_resolver.go index ac3d847..90925b3 100644 --- a/pkg/visitor/nsresolver/namespace_resolver.go +++ b/pkg/visitor/nsresolver/namespace_resolver.go @@ -370,6 +370,8 @@ func (ns *Namespace) ResolveName(nameNode ast.Vertex, aliasType string) (string, case "iterable": fallthrough case "object": + fallthrough + case "mixed": // 8.0 return part, nil } } diff --git a/pkg/visitor/nsresolver/namespace_resolver_test.go b/pkg/visitor/nsresolver/namespace_resolver_test.go index 7f62907..117f1c9 100644 --- a/pkg/visitor/nsresolver/namespace_resolver_test.go +++ b/pkg/visitor/nsresolver/namespace_resolver_test.go @@ -855,6 +855,12 @@ func TestDoNotResolveReservedNames(t *testing.T) { }, } + nameMixed := &ast.Name{ + Parts: []ast.Vertex{ + &ast.NamePart{Value: []byte("mixed")}, + }, + } + function := &ast.StmtFunction{ Name: &ast.Identifier{Value: []byte("bar")}, Params: []ast.Vertex{ @@ -900,6 +906,12 @@ func TestDoNotResolveReservedNames(t *testing.T) { Name: &ast.Identifier{Value: []byte("Object")}, }, }, + &ast.Parameter{ + Type: nameMixed, + Var: &ast.ExprVariable{ + Name: &ast.Identifier{Value: []byte("Mixed")}, + }, + }, }, } @@ -925,6 +937,7 @@ func TestDoNotResolveReservedNames(t *testing.T) { nameVoid: "void", nameIterable: "iterable", nameObject: "object", + nameMixed: "mixed", } nsResolver := nsresolver.NewNamespaceResolver()