mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Fix test
This commit is contained in:
parent
73f8f963fa
commit
633b210a32
@ -1101,7 +1101,12 @@ class ExpressionAnalyzer
|
|||||||
$offset = 'static::' . $stmt->dim->name;
|
$offset = 'static::' . $stmt->dim->name;
|
||||||
} elseif ($stmt->dim
|
} elseif ($stmt->dim
|
||||||
&& $source instanceof StatementsAnalyzer
|
&& $source instanceof StatementsAnalyzer
|
||||||
&& ($stmt_dim_type = $source->node_data->getType($stmt->dim))) {
|
&& ($stmt_dim_type = $source->node_data->getType($stmt->dim))
|
||||||
|
&& (!$stmt->dim instanceof PhpParser\Node\Expr\ClassConstFetch
|
||||||
|
|| !$stmt->dim->name instanceof PhpParser\Node\Identifier
|
||||||
|
|| $stmt->dim->name->name !== 'class'
|
||||||
|
)
|
||||||
|
) {
|
||||||
if ($stmt_dim_type->isSingleStringLiteral()) {
|
if ($stmt_dim_type->isSingleStringLiteral()) {
|
||||||
$offset = '\'' . $stmt_dim_type->getSingleStringLiteral()->value . '\'';
|
$offset = '\'' . $stmt_dim_type->getSingleStringLiteral()->value . '\'';
|
||||||
} elseif ($stmt_dim_type->isSingleIntLiteral()) {
|
} elseif ($stmt_dim_type->isSingleIntLiteral()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user