boolean (@NotNull Exprent currentExprent) { for (Exprent exprent : currentExprent.getAllExprents()) { if (!checkTypeExprent(exprent)) return false; } if (currentExprent.type == Exprent.EXPRENT_CONST) { ConstExprent constExprent = (ConstExprent)currentExprent; if (constExprent.getConstType().getTypeFamily() <= CodeConstants.TYPE_FAMILY_INTEGER) { // boolean or integer VarVersionPair varVersion = new VarVersionPair(constExprent.id, -1); if (!minExprentTypes.containsKey(varVersion)) { minExprentTypes.put(varVersion, constExprent.getConstType()); } } } CheckTypesResult exprentTypeBounds = currentExprent.checkExprTypeBounds(); if (exprentTypeBounds == null) return true; for (var entry : exprentTypeBounds.getMaxTypeExprents()) { if (entry.type.getTypeFamily() != CodeConstants.TYPE_FAMILY_OBJECT) { changeExprentType(entry.exprent, entry.type, false); } } boolean result = true; for (var entry : exprentTypeBounds.getMinTypeExprents()) { result &= changeExprentType(entry.exprent, entry.type, true); } return result; }