Using variables that are declared after the init function, leads to 'undefined' results in the Javascript target. Shouldn't we expect the same behaviour as the JVM backend?
Fields with a constant initializer do indeed behave differently on the JVM, because the JVM has a special "initial value" property for the fields, which is not set via code.
For true consistency, it should indeed not be set by kotlinc.