public void checkType(Symtab st) {
		String type;
		if (oa != null) {
			oa.setScope(scope);
			oa.checkType(st);
			type = oa.getAttributeType(st);
			/*if (st.lookup(type.toString()) != null) {
				Symtab sst = st.lookup(type.toString()).getTable();
				SymtabEntry attEntry = sst.lookup(oa.getID2());
				if (attEntry == null)
					Main.error(oa.getID2() + " is not an attribute of " + type);
				String id2Type = attEntry.getType();
				parlist.setScope(scope);
				parlist.checkType(st, id2Type);
			} else {*/
				parlist.setScope(scope);
				parlist.checkType(st, type);
			//}
		} else {
			SymtabEntry idEntry = st.lookup(ident.toString());
			if (idEntry == null)
				Main.error("invalid variable (" + ident.toString() + ")");
			else if (!idEntry.getScope().equals(scope))
				Main.error("variable does not exist in this scope (" + ident.toString() + ")");
			type = idEntry.getType();
			if (st.lookup(type.toString()) != null) {
				Symtab sst = st.lookup(type.toString()).getTable();
				if (parlist.getLength() != sst.size())
					Main.error(ident.toString() + " takes the wrong number of arguments");
				parlist.setScope(scope);
				parlist.checkType(st, sst, parlist.getLength());
			} else {
				parlist.setScope(scope);
				parlist.checkType(st, type);
			}
		}
	}