@@ -1961,7 +1961,6 @@ function (MutatingScope $scope) use ($expr, $nodeCallback, $context): Expression
19611961 if ($ expr ->name instanceof Expr) {
19621962 $ methodNameResult = $ this ->processExprNode ($ expr ->name , $ scope , $ nodeCallback , $ context ->enterDeep ());
19631963 $ throwPoints = array_merge ($ throwPoints , $ methodNameResult ->getThrowPoints ());
1964- $ throwPoints [] = ThrowPoint::createImplicit ($ scope , $ expr );
19651964 $ scope = $ methodNameResult ->getScope ();
19661965 } else {
19671966 $ calledOnType = $ scope ->getType ($ expr ->var );
@@ -1977,8 +1976,6 @@ function (MutatingScope $scope) use ($expr, $nodeCallback, $context): Expression
19771976 if ($ methodThrowPoint !== null ) {
19781977 $ throwPoints [] = $ methodThrowPoint ;
19791978 }
1980- } else {
1981- $ throwPoints [] = ThrowPoint::createImplicit ($ scope , $ expr );
19821979 }
19831980 }
19841981 $ result = $ this ->processArgs ($ methodReflection , $ parametersAcceptor , $ expr ->args , $ scope , $ nodeCallback , $ context );
@@ -1991,6 +1988,8 @@ function (MutatingScope $scope) use ($expr, $nodeCallback, $context): Expression
19911988 $ scope = $ scope ->invalidateExpression ($ arg ->value , true );
19921989 }
19931990 }
1991+ } else {
1992+ $ throwPoints [] = ThrowPoint::createImplicit ($ scope , $ expr );
19941993 }
19951994 $ hasYield = $ hasYield || $ result ->hasYield ();
19961995 $ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
0 commit comments