From 2b37bdf2538849112d7b250e285b53051501e455 Mon Sep 17 00:00:00 2001 From: orklah Date: Tue, 17 Aug 2021 23:40:03 +0200 Subject: [PATCH] get rid of the final check that was there only for static:: before --- .../Expression/Fetch/ClassConstFetchAnalyzer.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ClassConstFetchAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ClassConstFetchAnalyzer.php index 13e5be4f8..3ab63e863 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ClassConstFetchAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ClassConstFetchAnalyzer.php @@ -670,12 +670,10 @@ class ClassConstFetchAnalyzer } } - if ($const_class_storage->final) { - $stmt_type = clone $class_constant_type; + $stmt_type = clone $class_constant_type; - $statements_analyzer->node_data->setType($stmt, $stmt_type); - $context->vars_in_scope[$const_id] = $stmt_type; - } + $statements_analyzer->node_data->setType($stmt, $stmt_type); + $context->vars_in_scope[$const_id] = $stmt_type; return true; }