Skip to content

Allow imports, val, def and subtemplates in body of if/else if/else - #1087

Merged
mkurz merged 3 commits into
playframework:mainfrom
mkurz:block_as_template
Nov 27, 2025
Merged

mkurz merged 3 commits into
playframework:mainfrom
mkurz:block_as_template

Conversation

@mkurz

@mkurz mkurz commented Nov 27, 2025 •

Copy link
Copy Markdown
Member

@mkurz

mkurz commented Nov 27, 2025 •

Copy link
Copy Markdown
Member Author

As expected the tests fail as as currently imports, val, def and subtemplates are not allowed in if/else if/else bodies.

[info]   play.twirl.compiler.test.Helper$CompilationError: illegal start of simple expression

@mkurz
mkurz marked this pull request as ready for review November 27, 2025 12:37
@mkurz
mkurz merged commit b5e0ef4 into playframework:main Nov 27, 2025
15 checks passed
@mkurz
mkurz deleted the block_as_template branch November 27, 2025 12:37
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.

1 participant