+5. **Call-site argument validation (literal args).** When a *literal* argument (number, string, bool, nil, array, hash, or `-N`/`!b` over a literal) is passed to a user-defined function with an annotated parameter, the compiler flags concretely-conflicting cases at compile time (e.g. `f("oops")` where `f` is `def f(a : int)`). The check uses the same permissive compatibility rule as returns: numeric family is mutually compatible, `string`/`bool`/`any` accept anything. Non-literal arguments (variables, calls, dot expressions) are not flagged — only the inferrer can reason about those, and adaptive widening already keeps them silent. Module-style `ns.f(...)` calls are also skipped. Pass `--no-infer` to disable.
0 commit comments