Skip to content

Syntax highlighting gets confused if return type ends with a number #207

Closed
@aeschli

Description

@aeschli

From @kayahr on July 4, 2016 11:9

  • VSCode Version: 1.2.1
  • OS Version: Debian GNU/Linux 8.5

Steps to Reproduce:

  1. Open new TypeScript file.
  2. Copy/Paste the following code:
class Vector2 {
    public foobar(): Vector2 {
        return this;
    }
}

class Vector2D {
    public foobar(): Vector2D {
        return this;
    }
}

The method in the class Vector2D is properly colored but in the class Vector2 the syntax highlighting gets confused. Looks like this has something to do with the class name ending with a number.

Here is a screenshot showing a wrong color of the return and thiskeywords:

highlighting

In larger source code this gets quite confusing because subsequent methods in the same class are also affected.

Copied from original issue: microsoft/vscode#8720

Metadata

Metadata

Assignees

No one assigned

    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