Examples of GoType


Examples of ro.redeul.google.go.lang.psi.typing.GoType

            else
                needsComma = true;

            String templateVarName = String.format("$v%d$", varIndex++);
            varListString.append(templateVarName);
            GoType underlyingType = type.underlyingType();
            if ( isErrorType(type.underlyingType()) ) {
                errorVarIndex++;
                String errVarName = findVarName(expr, errorVarIndex);
                if (errorVarIndex > 0) {
                    checkString.append(" || ");
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.typing.GoType

    }


    private void checkRelationalExpression(InspectionResult result, GoRelationalExpression expression) {

        GoType leftType = expression.getLeftOperand().getType()[0];
        GoType rightType = expression.getRightOperand().getType()[0];

        switch (expression.op()) {
            case Eq:
            case NotEq:
        }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.typing.GoType

        for (GoType leftType : leftTypes) {
            for (GoType rightType : rightTypes) {
                if (leftType == null || rightType == null) {
                    return;
                }
                GoType leftUnder = leftType.underlyingType();
                GoType rightUnder = rightType.underlyingType();
                boolean hasInterface = leftUnder instanceof GoTypeInterface || rightUnder instanceof GoTypeInterface;
                if (!equality) {
                    if (leftType instanceof GoTypePointer || rightType instanceof GoTypePointer){
                        result.addProblem(expression, "operator "+operator+" not defined on pointer");
                        return;
                    }
                    if (hasInterface) {
                        result.addProblem(expression, "operator "+operator+" not defined on interface");
                        return;
                    }
                    if (shift){
                        if (rightUnder == null) {
                            return;
                        }
                        String rightUnderStr = rightUnder.toString();
                        if (rightUnderStr.startsWith("uint")||rightUnderStr.equals("byte")){
                            return;
                        }else{
                            result.addProblem(expression, "shift count type " + rightUnder+", must be unsigned integer");
                            return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.