From 3c9e42f88445a0174714594cb1eebeb1bfd7245f Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Mon, 7 May 2018 17:52:18 -0400 Subject: [PATCH] Fix string assertion for ternaries --- src/Psalm/Checker/Statements/Expression/TernaryChecker.php | 2 +- tests/TypeAlgebraTest.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Psalm/Checker/Statements/Expression/TernaryChecker.php b/src/Psalm/Checker/Statements/Expression/TernaryChecker.php index 8ea06de4b..4f6ea38fc 100644 --- a/src/Psalm/Checker/Statements/Expression/TernaryChecker.php +++ b/src/Psalm/Checker/Statements/Expression/TernaryChecker.php @@ -55,7 +55,7 @@ class TernaryChecker ) ); - $reconcilable_if_types = Algebra::getTruthsFromFormula($ternary_clauses); + $reconcilable_if_types = Algebra::getTruthsFromFormula($ternary_clauses, $new_referenced_var_ids); $changed_var_ids = []; diff --git a/tests/TypeAlgebraTest.php b/tests/TypeAlgebraTest.php index 5112ca2d5..83f3d7861 100644 --- a/tests/TypeAlgebraTest.php +++ b/tests/TypeAlgebraTest.php @@ -815,8 +815,9 @@ class TypeAlgebraTest extends TestCase '