Package com.redhat.ceylon.compiler.typechecker.model

Examples of com.redhat.ceylon.compiler.typechecker.model.UnknownType


    @Override
    public void visit(Tree.EntryType that) {
        super.visit(that);
        ProducedType kt = that.getKeyType().getTypeModel();
        ProducedType vt = that.getValueType()==null ?
                new UnknownType(unit).getType() :
                that.getValueType().getTypeModel();
        that.setTypeModel(unit.getEntryType(kt, vt));
    }
View Full Code Here


        int firstDefaulted = -1;
        for (int i=0; i<ets.size(); i++) {
            Tree.Type st = ets.get(i);
            ProducedType arg = st==null ? null : st.getTypeModel();
            if (arg==null) {
                arg = new UnknownType(unit).getType();
            }
            else if (st instanceof Tree.SpreadType) {
                //currently we only allow a
                //single spread type, but in
                //future we should also allow
View Full Code Here

            }
        }
    }

    private ProducedType newUnknownType() {
        return new UnknownType(typeFactory).getType();
    }
View Full Code Here

        }else if(exceptionMessage == null){
            errorReporter = makeModelErrorReporter(message);
        }else{
            errorReporter = makeModelErrorReporter(message+": "+exceptionMessage);
        }
        UnknownType ret = new UnknownType(typeFactory);
        ret.setErrorReporter(errorReporter);
        return ret.getType();
    }
View Full Code Here

    private void collectUnknownTypes(TypeDeclaration declaration, Map<Declaration, Declaration> visited) {
        if(visited.put(declaration, declaration) != null)
            return;
        if(declaration instanceof UnknownType){
            UnknownType ut = (UnknownType) declaration;
            ut.reportErrors();
            // don't report it twice
            ut.setErrorReporter(null);
        }else if(declaration instanceof UnionType){
            for(ProducedType t : declaration.getCaseTypes()){
                collectUnknownTypesResolved(t, visited);
            }
        }else if(declaration instanceof IntersectionType){
View Full Code Here

    public ProducedType getCallableType(ProducedType resultType) {
        return getCallableType(List.<ProducedType>of(resultType,getEmptyDeclaration().getType()));
    }

    public ProducedType getUnknownType() {
        return new UnknownType(this).getType();
    }
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.compiler.typechecker.model.UnknownType

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.