diff --git a/phpinspect-index.el b/phpinspect-index.el index 861e355..502b786 100644 --- a/phpinspect-index.el +++ b/phpinspect-index.el @@ -537,7 +537,7 @@ Returns a list of type name strings." (nconc used-types-rear (phpinspect--find-used-types-in-tokens (cdr (phpinspect-function-block token)))) used-types-rear (last used-types-rear))) - ((or (phpinspect-list-p token) (phpinspect-block-p token)) + ((or (phpinspect-list-p token) (phpinspect-block-p token) (phpinspect-array-p token)) (setq used-types-rear (nconc used-types-rear (phpinspect--find-used-types-in-tokens (cdr token))) used-types-rear (last used-types-rear)))) diff --git a/test/test-index.el b/test/test-index.el index faf243e..81abf76 100644 --- a/test/test-index.el +++ b/test/test-index.el @@ -98,6 +98,7 @@ if ((new Monkey())->tree() === true) { } return StaticThing::create(new ThingFactory())->makeThing((((new Potato())->antiPotato(new OtherThing(function (InnerFunctionParam $param) { if ($param instanceof InstanceOffed) { + $bing = [ 'bong' => [ 'nested' => NestedArray::call(), ], ]; // nothing } }))))); @@ -109,7 +110,7 @@ if ($param instanceof InstanceOffed) { (copy-sequence '("Cheese" "Bacon" "Ham" "Bagel" "Monkey" "ExtendedThing" "StaticThing" "Thing" "ThingFactory" "Potato" "OtherThing" - "InnerFunctionParam" "PropertyType" "InstanceOffed")) + "InnerFunctionParam" "PropertyType" "InstanceOffed" "NestedArray")) #'string<)) (sort used-types (lambda (s1 s2) (string< (phpinspect-name-string s1) (phpinspect-name-string s2))))))))