Skip to content

v1.31.0

Latest

Choose a tag to compare

@yhirose yhirose released this 06 Nov 18:47
· 1 commit to master since this release

This release fixes where the failure of a semantic predicate is counted, so that the message a predicate gives is no longer replaced by the error of an alternative that failed inside the match the predicate rejected. abidiff reports a change, so it is a minor release.

🐛 Fixed

  • A predicate rejects a match that went to its end, but its failure was counted where the rule started. An alternative tried after it that failed anywhere inside that match took the error, and its message was reported in place of the predicate's.

    S      <- Small / Any
    Small  <- NUMBER 'kg'      # its predicate rejects "200 kg" with "too heavy for kg"
    Any    <- NUMBER 'g'
    

    For 200 kg, the error is now 1:1 too heavy for kg instead of 1:5 ... expecting 'g'. This also holds when a rule with an error_message gave its message inside the rejected match.

  • The predicate's message is still reported where the match starts, and an error past the end of the match still takes over.

⚠️ Changes to be aware of

  • Programs linked against an earlier version should be rebuilt (abidiff reports a change). Source code compiles unchanged.