You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not that straightforward because in the following example:
(: a T)
(: foo (-> T T))
(= (foo $x) $x)
(= (bar $x) $x)
!(foo (bar a))
bar has no type and (bar a) interpreted as a tuple. As a consequence the type of (bar a) is (%Undefined% T) which is not unified with T required by foo. Thus relaxed type-checking allows using untyped functions in many examples.
For example recursive fact definition also fails with tuple type-checking enabled:
Describe the bug
Type checking doesn't work for tuples.
To Reproduce
Run the following MeTTa code:
Expected behavior
Type error:
(Error (a b) BadType)
Actual behavior
No type error:
succ
The text was updated successfully, but these errors were encountered: