8000 Phan does not understand throwing from a tenary expression · Issue #4887 · phan/phan · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Phan does not understand throwing from a tenary expression #4887
Open
@jornane

Description

@jornane

I have the following line in my project (inside a catch block):

return $booleanFlag ? throw $e : null;

When I check my code with Phan, I get the following error:

src/…/MyClass.php:105 PhanSyntaxError Fallback parser diagnostic error: ':' expected. (at column 29)

This additionally causes the class to not be available for the rest of the analysis, causing a lot of PhanUndeclaredClassMethod, PhanUndeclaredTypeProperty, and PhanUndeclaredTypeParameter false positives regarding use of this class.

< 4871 /div>

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

      0