Examples of GoPsiTypeSlice


Examples of ro.redeul.google.go.lang.psi.types.GoPsiTypeSlice

        if (functionName.equals("append")) {
            if (args.length > 1) {
                GoType[] types = args[0].getType();
                if (types.length > 0 && types[0] instanceof GoTypeSlice) {
                    GoPsiTypeSlice appendedSlice = ((GoTypeSlice) types[0]).getPsiType();
                    GoPsiType[] result = new GoPsiType[args.length];
                    result[0] = appendedSlice;
                    if (isCallWithVariadicParameter()){
                        result[1] = appendedSlice;
                        return result;
                    }
                    GoPsiType elem = appendedSlice.getElementType();
                    for (int i = 1; i < args.length; i++) {
                        result[i] = elem;
                    }
                    return result;
                }
            }
        } else if (functionName.equals("copy")) {
            if (args.length == 2) {
                GoType[] types = args[0].getType();
                if (types.length > 0 && types[0] instanceof GoTypeSlice) {
                    GoPsiTypeSlice copiedSlice = ((GoTypeSlice) types[0]).getPsiType();
                    return new GoPsiType[]{copiedSlice, copiedSlice};
                }
            }
        } else if (functionName.equals("delete")) {
            if (args.length == 2) {
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.types.GoPsiTypeSlice

            goType =  resolveToFinalType(goType);
        }
        if (!(goType instanceof GoPsiTypeSlice))
            return false;

        GoPsiTypeSlice otherTypeSlice = (GoPsiTypeSlice)goType;

        return getElementType().isIdentical(otherTypeSlice.getElementType());
    }
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.