From b8a1f5d5c90262e57827ca0dee2e67dcb439a0d5 Mon Sep 17 00:00:00 2001 From: Brown Date: Sun, 3 May 2020 00:08:03 -0400 Subject: [PATCH] Allow destructuring on arrayaccess implementers --- .../Analyzer/Statements/Expression/AssignmentAnalyzer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php index 79f011152..3004ac618 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php @@ -571,6 +571,7 @@ class AssignmentAnalyzer } elseif (!$assign_value_atomic_type instanceof Type\Atomic\TArray && !$assign_value_atomic_type instanceof Type\Atomic\ObjectLike && !$assign_value_atomic_type instanceof Type\Atomic\TList + && !$assign_value_type->hasArrayAccessInterface($codebase) ) { if ($assign_value_type->hasArray()) { if (IssueBuffer::accepts(