mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-29 18:22:41 +01:00
Handle $var::method() in XHPAST linter
Test Plan: Didn't see a fatal in new test case. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4783
This commit is contained in:
parent
cdb01f23a7
commit
8374dbc4e3
2 changed files with 7 additions and 2 deletions
|
@ -340,7 +340,10 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
|||
|
||||
$statics = $root->selectDescendantsOfType('n_CLASS_STATIC_ACCESS');
|
||||
foreach ($statics as $static) {
|
||||
$name = $static->getChildOfType(0, 'n_CLASS_NAME');
|
||||
$name = $static->getChildByIndex(0);
|
||||
if ($name->getTypeName() != 'n_CLASS_NAME') {
|
||||
continue;
|
||||
}
|
||||
if ($name->getConcreteString() == 'static') {
|
||||
$this->raiseLintAtNode(
|
||||
$name,
|
||||
|
|
|
@ -8,6 +8,8 @@ h(function /* ! */ () use ($c) {});
|
|||
static::m();
|
||||
1 ? 1 : 2;
|
||||
1 ?: 2;
|
||||
$a = 'stdClass';
|
||||
$a::m();
|
||||
~~~~~~~~~~
|
||||
disabled:3:1
|
||||
disabled:4:5
|
||||
|
|
Loading…
Reference in a new issue