jckarter/clay — Issue #27: Variant dispatch doesn't work with call-by-name functions
Author: jckarter
Created: 2011-12-10 05:29:29+00:00
State: open
Labels: v0.1

```
alias foo(x) { ... }

bar(x:Variant) { foo(*x); }
```

fails with a "dispatch cannot be used in this context" or similar error. Dispatch should be expanded normally into a switch over instances of the `alias` function, before it is analyzed as call-by-name, since mechanically, dispatch happens before the call.