public void typeCheck() { TypeDecl cond = getCondition().type(); if (!cond.isBoolean()) { error("the type of \"" + getCondition() + "\" is " + cond.name() + " which is not boolean"); } }