Skip to content

Less than (<) symbol after typescript type cast breaks all following syntax highlighting. #647

Closed
@mjbvz

Description

@mjbvz

From @Glinkis on August 17, 2018 14:37

When casting a value and performing a less than check straight after, it breaks all following syntax highlighting.

screen shot 2018-08-17 at 16 38 11 vs screen shot 2018-08-17 at 16 38 22

  • VSCode Version: 1.26.1
  • OS Version: macOS High Sierra 10.13.6

Steps to Reproduce:

// Correct colors.
function doesSomething(value: number) {
  if (value as number > 10) {
    return "huh"
  } else {
    return null;
  }
}
// Wrong colors.
function doesSomething2(value: number) {
  if (value as number < 10) {
    return "huh"
  } else {
    return null;
  }
}

Copied from original issue: microsoft/vscode#56689

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions