Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Inconsistency of type highlighting in new expression #216

Open
Vigilans opened this issue Nov 27, 2019 · 0 comments
Open

Inconsistency of type highlighting in new expression #216

Vigilans opened this issue Nov 27, 2019 · 0 comments

Comments

@Vigilans
Copy link
Contributor

Description

Consider following code:

new File();

new File<>();

new File[];

The second and the last will all be highlighted as type, only the first one will be recognized as function-call:

#181 provides another example:

new java.io.File();

It contains a bug (java.io cannot be recognized as any pattern), and File is also a function call:

I have no idea whether this is originally by-design, but I think we should highlight all possible form of types in new expression as type, for these reasons:

  • It is confusing for Type and Type<> to have different colors.
  • Fix the highlighting problem with a.b.Type.

Expected behavior:

Types in new expression should be highlighted as type under all circumstances.

Actual behavior:

Some types is highlighted as function-call.

Reproduces how often:

Always

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants