Package org.python.indexer.types

Examples of org.python.indexer.types.NType.follow()


            "b = foo('b')",
            "c = foo('c')");
        NType ftype = idx.lookupQnameType("fret.foo");
        assertEquals("<FuncType:_:<UnknownType:null>>", ftype.toString());
        NType ctype = idx.lookupQnameType("fret.c");
        assertEquals(ctype.follow(), ftype.asFuncType().getReturnType());
    }

    public void testListCompForIn() throws Exception {
        String src = index(
            "listforin.py",
View Full Code Here


            if (targetType == null) {
                return;
            }
        }

        targetType = targetType.follow();
        if (targetType == Indexer.idx.builtins.None) {
            return;
        }
        NBinding b = targetType.getTable().putAttr(attr.id, attr, v, ATTRIBUTE);
        if (b != null) {
View Full Code Here

            NType ret = new NUnknownType();
            for (NType tp : targetType.asUnionType().getTypes()) {
                resolveAttributeOnType(tp);
                ret = NUnionType.union(ret, getType());
            }
            setType(attr.setType(ret.follow()));
        } else {
            resolveAttributeOnType(targetType);
        }

        return getType();
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.