rgrig/topl

constrain arity when receiver object is mentioned

Closed this issue · 0 comments

The patterns x.* and x.*[*] are both translated to

  1. argument 0 (the receiver) must equal the automaton variable x
  2. the name of the method can be anything
  3. the arity can be anything

Condition 1 is checked at run-time, while conditions 2 and 3 are checked at compile time. Static methods will pass checks 2 and 3, and then cause a crash when topl.Checker checks 1.

Condition 3 should be "the arity is at least 1".