Package ro.redeul.google.go.inspection.fix

Examples of ro.redeul.google.go.inspection.fix.ChangeReturnsParametersFix


                for (GoType expressionType : expressionTypes) {
                    if (returnTypeIndex >= expectedReturnTypes.length) {
                        result.addProblem(
                                statement,
                                GoBundle.message("error.too.many.arguments.to.return"),
                                new ChangeReturnsParametersFix(statement));
                        return;
                    }

                    if (!expectedReturnTypes[returnTypeIndex].isAssignableFrom(expressionType)) {
                        result.addProblem(expression,
                                GoBundle.message("warn.function.return.type.mismatch",
                                        expression.getText(),
                                        GoTypes.getRepresentation(expressionType, currentFile),
                                        GoTypes.getRepresentation(expectedReturnTypes[returnTypeIndex], currentFile)));
                    }

                    returnTypeIndex++;
                }
            }

            if (returnTypeIndex < expectedReturnTypes.length)
                result.addProblem(statement,
                        GoBundle.message("error.not.enough.arguments.to.return"),
                        new ChangeReturnsParametersFix(statement));
        }
View Full Code Here

TOP

Related Classes of ro.redeul.google.go.inspection.fix.ChangeReturnsParametersFix

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.