You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Scala 3, if without an else always evaluates to Unit. This means code like div(if (cond) h1("a"), ...) now never produces anything, even if the conditions is true, which has lead to a few silent issues when we transitioned to Scala 3 where stuff suddenly wasn't rendered anymore. Are there any other reasons to keep allowing units in templates? If not, it seems better to disallow this now to avoid mistakes like this?
The text was updated successfully, but these errors were encountered:
niklasf
added a commit
to niklasf/scalatags
that referenced
this issue
Dec 27, 2022
In Scala 3,
if
without anelse
always evaluates toUnit
. This means code likediv(if (cond) h1("a"), ...)
now never produces anything, even if the conditions is true, which has lead to a few silent issues when we transitioned to Scala 3 where stuff suddenly wasn't rendered anymore. Are there any other reasons to keep allowing units in templates? If not, it seems better to disallow this now to avoid mistakes like this?The text was updated successfully, but these errors were encountered: