Simple example code to demonstrate the problem (here, setting a LineStyle variable with a DisplayStyle value):
val unexpectedVariableAssignment by variable<LineStyle>()
@Composable
fun demoUnexpectedVariableAssignment() {
Div(attrs = {
style {
unexpectedVariableAssignment(DisplayStyle.Flex)
}
})
}
Expected: The line unexpectedVariableAssignment(DisplayStyle.Flex) should not compile
Actual: The code compiles and runs fine.