trueagi-io / hyperon-experimental

MeTTa programming language implementation
https://metta-lang.dev
MIT License
147 stars 49 forks source link

Match operation doesn't report abscense of the first arguement as a error #578

Closed vsbogd closed 3 months ago

vsbogd commented 8 months ago

Raising https://github.com/trueagi-io/hyperon-experimental/issues/539#issuecomment-1897986242 by @luketpeterson as a separate issue

Minimal MeTTa has created a number of additional situations where syntax errors aren't reported as errors, per se. For example:

(= someNumber 1) !(match (= someNumber $n) $n) ; missing &space as first arg

used to produce (Error (match (= someNumber $n) $n) IncorrectNumberOfArguments) but under minimal, the result is that the atom is just returned by the execution.

vsbogd commented 3 months ago

Fixed