writeByte(NOpre);
writeByte(THIStpe);
    private void writeType(Type tp) {	switch (tp) {	case NoType:	    writeByte(NOtpe);	    writeByte(0); // space for length	    break;	case NoPrefix:	    writeByte(NOpre);	    writeByte(0); // space for length	    break;	case ThisType(Symbol sym):	    writeByte(THIStpe);	    writeByte(0); // space for length	    writeRef(sym);	    break;	case SingleType(Type pre, Symbol sym):	    writeByte(SINGLEtpe);	    writeByte(0); // space for length	    writeRef(pre);	    writeRef(sym);	    break;	case ConstantType(Type base, AConstant value):	    writeByte(CONSTANTtpe);	    writeByte(0); // space for length	    writeRef(base);	    writeRef(value);	    break;	case TypeRef(Type pre, Symbol sym, Type[] args):	    writeByte(TYPEREFtpe);	    writeByte(0); // space for length	    writeRef(pre);	    writeRef(sym);	    writeRefs(args);	    break;	case CompoundType(Type[] parents, Scope members):	    writeByte(COMPOUNDtpe);	    writeByte(0); // space for length            writeRef(tp.symbol());	    writeRefs(parents);	    break;	case MethodType(Symbol[] vparams, Type result):	    writeByte(METHODtpe);	    writeByte(0); // space for length	    writeRef(result);	    for (int i = 0; i < vparams.length; i++) {		Type ptype = vparams[i].type();		int pflags = vparams[i].flags;		if ((pflags & (REPEATED | DEF)) != 0)		    writeRef(new FlagsAndType(encodeFlags(pflags), ptype));		else		    writeRef(ptype);	    }	    break;	case PolyType(Symbol[] tparams, Type result):	    writeByte(POLYtpe);	    writeByte(0); // space for length	    writeRef(result);	    writeRefs(tparams);	    break;	case OverloadedType(Symbol[] alts, Type[] alttypes):	    writeByte(OVERLOADEDtpe);	    writeByte(0); // space for length	    writeRefs(alts);	    writeRefs(alttypes);	    break;	default:	    throw new ApplicationError();	}    }