X Tutup
Skip to content

Share scope between all switch cases#775

Merged
Perryvw merged 6 commits intoTypeScriptToLua:masterfrom
ark120202:switch-scope
Jan 1, 2020
Merged

Share scope between all switch cases#775
Perryvw merged 6 commits intoTypeScriptToLua:masterfrom
ark120202:switch-scope

Conversation

@ark120202
Copy link
Contributor

Fixes #698.

return foo;
}
`.expectToMatchJsResult();
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding a test case for

let foo: number = 0;
switch (foo) {
    case 0: {
        let foo = true;
    }
    case 1:
        return foo;
}

@Perryvw Perryvw merged commit 96c3f8d into TypeScriptToLua:master Jan 1, 2020
@ark120202 ark120202 deleted the switch-scope branch January 3, 2020 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch cases should share scope

2 participants

X Tutup