Fix crash in linting
Redeclared functions in non-whole-program analyze mode caused
an assertion failure.
Test Plan:
% cat bug.php
<?php
if (isset($g)) {
function f($x, $y) {}
} else {
function f($x) {}
}
f($x);
% hphp -vWholeProgram=false -t analyze bug.php
Esse commit está contido em:
@@ -1128,7 +1128,7 @@ TypePtr SimpleFunctionCall::inferAndCheck(AnalysisResultPtr ar, TypePtr type,
|
||||
setAttribute(VariableTable::NeedGlobalPointer);
|
||||
}
|
||||
if (m_params) {
|
||||
if (func && func->isRedeclaring()) {
|
||||
if (Option::WholeProgram && func && func->isRedeclaring()) {
|
||||
FunctionScope::FunctionInfoPtr info =
|
||||
FunctionScope::GetFunctionInfo(m_name);
|
||||
always_assert(info);
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário