From 95429b7037000168e1e331303d115495942803ad Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Sun, 19 Nov 2017 14:09:20 -0500 Subject: [PATCH] Fix invalid assignment to Union --- src/Psalm/Checker/Statements/Expression/FetchChecker.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Psalm/Checker/Statements/Expression/FetchChecker.php b/src/Psalm/Checker/Statements/Expression/FetchChecker.php index b7c2269de..6cbbec155 100644 --- a/src/Psalm/Checker/Statements/Expression/FetchChecker.php +++ b/src/Psalm/Checker/Statements/Expression/FetchChecker.php @@ -958,11 +958,9 @@ class FetchChecker $replacement_type ); - $type = new Type\Union([ - new TArray([ - Type::getString(), - $generic_params, - ]), + $type = new TArray([ + Type::getString(), + $generic_params, ]); if (!$array_access_type) {