I don't know if this belongs in elm-compiler or here. As I couldn't reproduce it without Autocomplete I decided this is where it should go first. To me the problem does however seem to be the compiler doing something it shouldn't.
Using this example the ordering of the compiled Javascript in the let declaration in update becomes incorrect and causes val to become undefined. If one attempts to use val for anything a runtime exception is raised. I haven't been able to produce a reproduction without elm-autocomplete by just attempting to do the same things it does. Somehow it's causing the Elm compiler to mess up the order in let blocks.
I don't know if this belongs in elm-compiler or here. As I couldn't reproduce it without Autocomplete I decided this is where it should go first. To me the problem does however seem to be the compiler doing something it shouldn't.
Using this example the ordering of the compiled Javascript in the
let
declaration inupdate
becomes incorrect and causesval
to becomeundefined
. If one attempts to useval
for anything a runtime exception is raised. I haven't been able to produce a reproduction without elm-autocomplete by just attempting to do the same things it does. Somehow it's causing the Elm compiler to mess up the order inlet
blocks.