Commit c8f7375
committed
Support calling variables with union of function types
When a variable has a union of function types (e.g.
fun((integer()) -> integer()) | fun((number()) -> atom())), calling
it would fail because the type was wrapped in a singleton list and
processed through expect_intersection_type, which rejects unions.
Add a clause to expect_fun_type1 that unwraps single-element lists
before processing, allowing the union to be handled by the existing
fun_ty_union logic.1 parent 4fb91d6 commit c8f7375
2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
1502 | 1507 | | |
1503 | 1508 | | |
1504 | 1509 | | |
| |||
File renamed without changes.
0 commit comments