syntax icon indicating copy to clipboard operation
syntax copied to clipboard

weird error message in wrong object literals

Open bobzhang opened this issue 4 years ago • 0 comments

The error message below is not very intuitive

Syntax error!
  test.res:8:17-18
  
  6 │ // let u : t = x["x"]
  7 │ 
  8 │ let u = {"x":3 , z : 2}
  
  consecutive statements on a line must be separated by ';' or a newline

 Syntax error!
  test.res:8:17-9:5
  
  6 │ // let u : t = x["x"]
  7 │ 
  8 │ let u = {"x":3 , 
  9 │     z : 2}
  
  Did you forget a `}` here?


  Syntax error!
  test.res:9:7
  
  7 │ 
  8 │ let u = {"x":3 , 
  9 │     z : 2}
  
  I'm not sure what to parse here when looking at ":".

bobzhang avatar Jan 27 '21 03:01 bobzhang