Skip to content
  • John van Groningen's avatar
    fix code generation for irrefutable matches of constructors with dictionaries. · c5b5b1a0
    John van Groningen authored
    the frontend of the compiler assumes the MatchNode yields a tuple without dictionaries,
    so after adding the dictionaries the tuple selectors select incorrect values.
    it would be better to fix this in the frontend, but it is easier in the backend,
    therefore the code generator computes the number of dictionaries by subtracting
    the arity of the result of the match node from the arity of the constructor,
    and pops the dictionaries from the stack.
    c5b5b1a0