This repository was archived by the owner on Jun 15, 2023. It is now read-only.
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Feature: relax the constraint of ...
in list construction #670
Closed
Description
Currently, ...
is only allowed in the tail position, list {1,2,... tail}
,
For example:
let l = a => list{1,2,...a} // works
let l = a => list{1,2,...a, 3, ...a} // fails
The current situation is a bit weird, it is not a syntax error, but a type error
This has type: int Somewhere wanted: list<int>
This also seems to be a bug:
let l = (a,b) => list{1,2, ...b , 3,...a}
The inferred type for b
is int
Metadata
Metadata
Assignees
Labels
No labels