#"Loop seems to be infinite" for counting loop

1 messages ยท Page 1 of 1 (latest)

plain rock
#

Hello! I encountered something unexpected.
The following works:

let i = 0
while i < 10 {
  [Test]
  i += 1
}

The following fails to compile with a "loop seems to be infinite" error:

let i = 0
while i < 10 [
  Test
  #i += 1
]

I would assume the two are identical, so perhaps this is bug, but it might just be a misunderstanding of the syntax on my part. I haven't found any related Github issue.
I am using Typst v0.11.1.

steep blade
#

?r

#let i = 2

#i += 1
tropic ledgeBOT
steep blade
#

they are not identical ๐Ÿ™‚

plain rock
#

Oh. I feel silly now ๐Ÿ˜… Thank you!