public override T VisitStaticFunctionCall(BoundStaticFunctionCall call) { CheckMissusedPrimitiveType(call.TypeRef); CheckUndefinedMethodCall(call, call.TypeRef.ResolveTypeSymbol(DeclaringCompilation) as TypeSymbol, call.Name); // check deprecated CheckObsoleteSymbol(call.PhpSyntax, call.TargetMethod, isMemberCall: true); // remember there is call to `parent::__construct` if (call.TypeRef is BoundReservedTypeRef rt && rt.ReservedType == ReservedTypeRef.ReservedType.parent && call.Name.IsDirect && call.Name.NameValue.Name.IsConstructName) { CallsParentCtor = true; } // check the called method is not abstract if (call.TargetMethod.IsValidMethod() && call.TargetMethod.IsAbstract) { // ERR Add(call.PhpSyntax.Span, Devsense.PHP.Errors.Errors.AbstractMethodCalled, call.TargetMethod.ContainingType.PhpName(), call.Name.NameValue.Name.Value); } // return base.VisitStaticFunctionCall(call); }
public override object VisitStaticFunctionCall(BoundStaticFunctionCall x) { return(x.Update( (BoundTypeRef)Accept(x.TypeRef), (BoundRoutineName)Accept(x.Name), VisitImmutableArray(x.ArgumentsInSourceOrder), VisitImmutableArray(x.TypeArguments))); }
public override void VisitStaticFunctionCall(BoundStaticFunctionCall call) { // TODO: Enable the diagnostic when the __callStatic() method is properly processed during analysis //CheckUndefinedMethodCall(call, call.TypeRef?.ResolvedType, call.Name); base.VisitStaticFunctionCall(call); // check deprecated CheckObsoleteSymbol(call.PhpSyntax, call.TargetMethod); }
public override bool VisitStaticFunctionCall(BoundStaticFunctionCall x) { if (x.TypeRef.IsSelf() || x.TypeRef.IsParent()) { if (_lazyStaticCalls == null) { _lazyStaticCalls = new List <MethodSymbol>(); } if (x.TargetMethod.IsValidMethod() && x.TargetMethod.IsStatic) { _lazyStaticCalls.Add(x.TargetMethod); } else if (x.TargetMethod is AmbiguousMethodSymbol ambiguous) { _lazyStaticCalls.AddRange(ambiguous.Ambiguities.Where(sm => sm.IsStatic)); } } return(base.VisitStaticFunctionCall(x)); }
public override void VisitStaticFunctionCall(BoundStaticFunctionCall call) { // TODO: Enable the diagnostic when the __callStatic() method is properly processed during analysis //CheckUndefinedMethodCall(call, call.TypeRef?.ResolvedType, call.Name); base.VisitStaticFunctionCall(call); }