rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

%%private without body should not be allowed

Open cknitt opened this issue 3 years ago • 0 comments

Just saw something like this in a codebase:

%%private
let x = 42

This usage of %%private is allowed by the parser/compiler, but has no effect at all.

What the author actually meant was

%%private(let x = 42)

Therefore, the usage without a "body" should cause a compiler error IMHO.

cknitt avatar Sep 01 '22 11:09 cknitt