Branch: Tag:

2022-01-08

2022-01-08 13:15:03 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix A - (B|C) in INEXACT mode.

4878:    }       tmp = low_type_binop(op, a, b->car, remap, aflags, bflags, remap_flags); -  if ((remap_flags & PT_FLAG_REMAP_INEXACT) && tmp) { -  if (op == PT_BINOP_AND) { +  if (remap_flags & PT_FLAG_REMAP_INEXACT) { +  if (tmp && (op == PT_BINOP_AND)) {    if (remap) {    do_free_mapping(remap->markers);    remap->markers = orig_markers;
4887:    free_type(tmp);    add_ref(a);    return a; +  } else if (!tmp && (op == PT_BINOP_MINUS)) { +  if (remap) { +  do_free_mapping(remap->markers); +  remap->markers = orig_markers;    } -  +  return NULL;    } -  +  }    if (remap) {    do_free_mapping(remap->markers);    remap->markers = copy_mapping(orig_markers);