caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] unreasonable syntax error
@ 2013-01-17 20:08 Christopher Zimmermann
  0 siblings, 0 replies; only message in thread
From: Christopher Zimmermann @ 2013-01-17 20:08 UTC (permalink / raw)
  To: caml-list

Hi,

compiling this piece of code gives an unreasonable syntax error:

let a = [|0|] in
  a.(0) <-
    if true then (), else ()

The ',' before the "else" is of course wrong.
But the error explanation is kind of misleading:

File "test.ml", line 3, characters 21-25:
Error: Syntax error: ')' expected
File "test.ml", line 2, characters 4-5:
Error: This '(' might be unmatched


Christopher


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-17 20:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-17 20:08 [Caml-list] unreasonable syntax error Christopher Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).