Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

E010: Annotation Accepted but Not Verified

Severity: Warning

annotation for `dispatch` accepted but not verified: intersection-of-function annotations
are accepted as declared types but not verified against the body

The type annotation was accepted and will be used as the binding’s type for callers, but tix did not verify that the function body actually conforms to the annotation.

Common causes

  • Intersection type annotations (overloaded function signatures):
    /** type: dispatch :: (int -> int) & (string -> string) */
    dispatch = x: if builtins.isInt x then x + 1 else x + "!";
    
  • Union types in annotations are also currently trusted without verification.

How to fix

  • This warning is informational – it tells you the annotation is trusted, not checked. No fix is required.
  • If you want verification, simplify the annotation to a non-intersection type where possible.
  • Make sure your implementation actually matches the declared overloads, since tix won’t catch mismatches here.