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

Inconsistent highlighting of "void" #422

Closed
@roblourens

Description

@roblourens

Reported in microsoft/vscode#120954

As a return type, void is support.class.php while string is storage.type.php

Is this as expected? I have no idea.

Original steps:

Steps to Reproduce:

  1. Create a new .php file
  2. Paste the following code
<?php
class MyClass
{
  public static function methodA() : void
  {
  }

  public static function methodB() : string
  {
      return "I'm a string";
  }
}
  1. Check the editor tokens and scopes
    image

You will see that the void type declaration is hightlighted as a support.class. I understand that it is a keyword, like string, int and others, not a class.


Also noticed that it's inconsistent here:

<?php

/**
 * @param void $x
 */
function a($x): void {
	return '';
}

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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