diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/ExpressionIdentifier.php b/src/Psalm/Internal/Analyzer/Statements/Expression/ExpressionIdentifier.php index 0e81a27a1..0968a9c3f 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/ExpressionIdentifier.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/ExpressionIdentifier.php @@ -216,6 +216,10 @@ class ExpressionIdentifier } } + if ($stmt instanceof PhpParser\Node\Expr\ConstFetch) { + return implode('\\', $stmt->name->parts); + } + return self::getVarId($stmt, $this_class_name, $source); } }