Added test for #1939
Fixed #1939 let variables need to be declared final
Fixed test for #1939