Expr (Pos pos, Pos closingBracket, boolean ambiguous, Type type, int mult, long weight, JoinableList<Err> errors) {
this.pos = (pos==null ? Pos.UNKNOWN : pos);
this.closingBracket = (closingBracket==null ? Pos.UNKNOWN : closingBracket);
this.ambiguous = ambiguous;
if (errors==null) errors = emptyListOfErrors;
if (type==EMPTY && errors.size()==0) errors = errors.make(new ErrorType(pos, "This expression failed to be typechecked"));
this.mult = (mult<0 || mult>2) ? 0 : mult;
this.type = (errors.size()>0 || type==null) ? EMPTY : type;
this.weight = (weight>0) ? weight : 0;
this.errors = errors;
}