syntax icon indicating copy to clipboard operation
syntax copied to clipboard

weird error message for list literals

Open bobzhang opened this issue 4 years ago • 3 comments

Screenshot 2020-12-27 at 10 16 09 AM

It seems to interpret it as list[1]

bobzhang avatar Dec 27 '20 02:12 bobzhang

The list syntax is list{1, 2, 3}: https://rescript-lang.org/docs/manual/latest/array-and-list#list list[1] would conflict with let list = [1, 2, 3]; Array.get(list, 1)

IwanKaramazow avatar Dec 28 '20 07:12 IwanKaramazow

I know the ambiguity, my point is that the error message is unintuitive

bobzhang avatar Dec 28 '20 08:12 bobzhang

Ok, will improve the error message.

IwanKaramazow avatar Dec 28 '20 08:12 IwanKaramazow

The rescript-lang/syntax repo is obsolete and will be archived soon. If this issue is still relevant, please reopen in the compiler repo (https://github.com/rescript-lang/rescript-compiler) or comment here to ask for it to be moved. Thank you for your contributions.

stale[bot] avatar May 29 '23 03:05 stale[bot]