Skip to content

Allow a colon before a single-line if - #1925

Merged
TwitchBronBron merged 2 commits into
v1from
350-colon-before-if-statement-is-not-allowed
Oct 16, 2026
Merged

TwitchBronBron merged 2 commits into
v1from
350-colon-before-if-statement-is-not-allowed

Conversation

@iObject

@iObject iObject commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

x = 1 : if x = 1 then print x is valid on device but was flagged as "Colon before 'if' statement is not allowed". Verified on device (Roku OS 16.0.4): a colon before a single-line if compiles, while a colon before a multi-line if is a syntax error. The diagnostic is now only reported for multi-line if statements, and its message says so.

`x = 1 : if x = 1 then print x` is valid on device but was flagged as
"Colon before 'if' statement is not allowed". Verified on device
(Roku OS 16.0.4): a colon before a single-line `if` compiles, while a
colon before a multi-line `if` is a syntax error. The diagnostic is now
only reported for multi-line `if` statements, and its message says so.
@iObject iObject linked an issue Oct 16, 2026 that may be closed by this pull request
@TwitchBronBron
TwitchBronBron enabled auto-merge (squash) October 16, 2026 16:31
@TwitchBronBron TwitchBronBron changed the title Allow a colon before a single-line if (#350) Allow a colon before a single-line if Oct 16, 2026
@TwitchBronBron
TwitchBronBron enabled auto-merge (squash) October 16, 2026 16:31
@TwitchBronBron
TwitchBronBron merged commit 79f2aa6 into v1 Oct 16, 2026
11 checks passed
@TwitchBronBron
TwitchBronBron deleted the 350-colon-before-if-statement-is-not-allowed branch October 16, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Colon before 'if' statement is not allowed

2 participants