Skip to content

Conversation

weswigham
Copy link
Member

Fixes our nightly publish, which requires a clean post-LKG build. Looks like #50528 missed an instance of enum narrowing behaviors changing a bit in our own codebase between when it was made and when it was merged.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 7, 2022
@@ -431,7 +431,7 @@ namespace Debug {
const above = lane > 0 ? connectors[column][lane - 1] : 0;
let connector = connectors[column][lane];
if (!connector) {
Copy link
Member

@jakebailey jakebailey Nov 7, 2022

Choose a reason for hiding this comment

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

I actually fixed this on the module branch another way, to add a None = 0 value to the enum instead, that way it's not never.

Copy link
Member

Choose a reason for hiding this comment

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

(Also thankfully post-modules I ensure all projects get checked, so we should catch these.)

Copy link
Member

Choose a reason for hiding this comment

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

Though, I think both aren't quite right anyhow given I think what this is checking is not 0, but undefined via out-of-bounds.

@@ -431,7 +431,7 @@ namespace Debug {
const above = lane > 0 ? connectors[column][lane - 1] : 0;
let connector = connectors[column][lane];
if (!connector) {
Copy link
Member

Choose a reason for hiding this comment

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

Though, I think both aren't quite right anyhow given I think what this is checking is not 0, but undefined via out-of-bounds.

@weswigham weswigham merged commit d83a5e1 into microsoft:main Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants