return checkValidLiteralIntExpr(((GoParenthesisedExpression) expr).getInnerExpression());
return false;
}
public static void checkFunctionTypeArguments(GoCallOrConvExpression call, InspectionResult result) {
GoFunctionDeclaration goFunctionDeclaration = GoExpressionUtils.resolveToFunctionDeclaration(call);
GoExpr[] goExprs = call.getArguments();
int index = 0;
if (goFunctionDeclaration == null)
return;
if (call instanceof GoBuiltinCallOrConversionExpression) {
GoPsiType[] builtinTypes = ((GoBuiltinCallOrConversionExpression) call).getArgumentsType();
if (builtinTypes.length > 0 && goExprs.length == builtinTypes.length) {
for (; index < goExprs.length; index++) {
GoExpr goExpr = goExprs[index];
GoPsiType type = builtinTypes[index];
if (!checkParametersExp(type, goExpr)){
result.addProblem(
goExpr,
GoBundle.message("warning.functioncall.type.mismatch", type.getText()),
ProblemHighlightType.GENERIC_ERROR_OR_WARNING, new CastTypeFix(goExpr, GoTypes.fromPsi(type)));
return;
}
}
}
return;
}
for (GoFunctionParameter functionParameter : goFunctionDeclaration.getParameters()) {
if (index >= goExprs.length)
return;
GoPsiType type = functionParameter.getType();
String typeName = type != null ? type.getText() : "";
if (functionParameter.isVariadic()) {