···10011001 )
10021002}
1003100310041004+fn no_duplicate_let_after_case_with_same_named_variable_with_declaration_before_and_after() {
10051005+ assert_js!(
10061006+ r#"
10071007+pub fn go() {
10081008+ let x = 0
10091009+ let x = case #(1, 2) {
10101010+ #(_, x) -> x
10111011+ }
10121012+10131013+ let x = x
10141014+ x
10151015+}"#
10161016+ )
10171017+}
10181018+10191019+#[test]
10041020fn no_duplicate_let_after_case_with_same_named_variable() {
10051021 assert_js!(
10061022 r#"
10071023pub fn go() {
10081008- let x = 0
10091024 let x = case #(1, 2) {
10101025 #(_, x) -> x
10111026 }
···11+---
22+source: compiler-core/src/javascript/tests/case.rs
33+expression: "\npub fn go() {\n let x = 0\n let x = case #(1, 2) {\n #(_, x) -> x\n }\n\n let x = x\n x\n}"
44+---
55+----- SOURCE CODE
66+77+pub fn go() {
88+ let x = 0
99+ let x = case #(1, 2) {
1010+ #(_, x) -> x
1111+ }
1212+1313+ let x = x
1414+ x
1515+}
1616+1717+----- COMPILED JAVASCRIPT
1818+export function go() {
1919+ let x = 0;
2020+ let _block;
2121+ let $ = [1, 2];
2222+ let x$1 = $[1];
2323+ _block = x$1;
2424+ let x$2 = _block;
2525+ let x$3 = x$2;
2626+ return x$3;
2727+}