Fork me on GitHub
#clojurescript
<
2024-04-23
>
vraid15:04:53

I found some weird behaviour in the clojurescript compiler. Is this intended? Running npx shadow-cljs release app, but it appears in vscode with clj-kondo too

dpsutton16:04:09

those are correctly flagged as invalid numbers

dpsutton16:04:22

a leading 0 indicates that you are writing base 8 numbers or octal numbers

👍 2
dpsutton16:04:47

8 in decimal = 010 in octal. There is no 08 number.

vraid16:04:39

Oh that explains it. Glad it caught it, thanks!

👍 1
pez16:04:03

The linter could elaborate a tiny bit maybe. 😃

🤷 1
1
borkdude17:04:04

The error probably comes from rewrite-clj or tools.reader (or maybe via both) which clj-kondo catches and reports

borkdude17:04:21

but since clj-kondo has forks of both, it could improve that

😂 1
vraid21:04:17

I was so focused on aligning my numbers that it didn't strike me that it could be read in another way. I don't think i've ever used octal (intentionally). Hex sure, but not octal