Flow version: 0.102
No error or warning
Throws a Unexpected token :Flow(ParseError)
When parsing
/* : */
or
/* ::: */
but not when there is two :
/* :: */
if other characters are present in the string (before the first colon) the error vanishes
This is special syntax
This should only apply when the file has the // @flow pragma. enabling Flow on a file changes the semantics of this, and one other construct -- a<b>(c) becomes a type argument, rather than ((a < b) > c). all our other syntax extensions are otherwise invalid JS, as far as I know.
So, this is working as intended (reopen if it's happening without @flow). If anything, we could probably use better documentation about the semantics changes vs normal JS.
Most helpful comment
This should only apply when the file has the
// @flowpragma. enabling Flow on a file changes the semantics of this, and one other construct --a<b>(c)becomes a type argument, rather than((a < b) > c). all our other syntax extensions are otherwise invalid JS, as far as I know.So, this is working as intended (reopen if it's happening without
@flow). If anything, we could probably use better documentation about the semantics changes vs normal JS.