Skip to content

[TS] type parameters across multiple lines aren't highlighted properly #739

Closed
@peat-psuwit

Description

@peat-psuwit

Issue Type: Bug

The following code highlights correctly in VSCode:

Object.assign<object, object>({}, {});

However, this code does not, despite being semantically the same:

Object.assign<
  object,
  object
>({}, {});

In the latter example, assign is supposed to be function-like yellow, and small-cased object is supposed to be type-like green. Instead, both of them are generic-blue.

How VS Code highlights the above code

Steps to reproduce:

  1. Create a new file, ending with .ts.
  2. Copy both of the sample codes into the file. Observe the difference between the first & the second code.

VS Code version: Code - Insiders 1.34.0-insider (d234937aedcbc265d2272ba5861125293239f9c7, 2019-04-05T05:13:22.859Z)
OS version: Linux x64 4.15.0-46-generic

System Info
Item Value
CPUs Intel(R) Core(TM)2 Duo CPU P7350 @ 2.00GHz (2 x 1669)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: disabled_off
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
surface_synchronization: enabled_on
video_decode: unavailable_off
webgl: enabled
webgl2: enabled
Load (avg) 3, 3, 2
Memory (System) 3.60GB (0.34GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicatelimitationIssue is result of tmLanguage limitation where in the lookup does not go beyond current linewontfixIssue is either side effect or limitation that will not be fixed for now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions