mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Analyse binary ops always
This commit is contained in:
parent
f15cc7dd5b
commit
c283f0877d
@ -587,6 +587,7 @@ class CallAnalyzer
|
||||
|| $arg->value instanceof PhpParser\Node\Expr\ArrayDimFetch
|
||||
|| $arg->value instanceof PhpParser\Node\Expr\PropertyFetch
|
||||
|| $arg->value instanceof PhpParser\Node\Expr\Array_
|
||||
|| $arg->value instanceof PhpParser\Node\Expr\BinaryOp
|
||||
) {
|
||||
if (ExpressionAnalyzer::analyze($statements_analyzer, $arg->value, $context) === false) {
|
||||
return false;
|
||||
|
@ -601,6 +601,18 @@ class MethodCallTest extends TestCase
|
||||
}',
|
||||
'error_message' => 'UndefinedThisPropertyFetch',
|
||||
],
|
||||
'complainAboutUndefinedPropertyOnMixedCallConcatOp' => [
|
||||
'<?php
|
||||
class A {
|
||||
/**
|
||||
* @psalm-suppress MixedMethodCall
|
||||
*/
|
||||
public function foo(object $a) : void {
|
||||
$a->bar("bat" . $this->baz);
|
||||
}
|
||||
}',
|
||||
'error_message' => 'UndefinedThisPropertyFetch',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user