Skip to content

Fail to parse throw exception in key offset access #704

@kylekatarnls

Description

@kylekatarnls
  • PHP Depend version: 2.16.1
  • PHP Version: 8.3.0 (>= 8.0)

Scanning:

return $a[
    $value ?? throw new \InvalidArgumentException('should not be null')
];

Current Behavior

PDepend\Source\Parser\UnexpectedTokenException : Unexpected token: ], line: 3, col: 1

Expected Behavior

No exception scanning should just find a non nullable key offset is searched in $a.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions