Using an arrow function that throws an exception as a function argument causes the last parenthesis after the throw key to be incorrectly highlighted as an error.
Code snippet
$exception = new Exception('Test exception');
some_function(fn() => throw $exception);
some_function(fn() => throw $exception, 'some other argument');
What happened?
Using an arrow function that throws an exception as a function argument causes the last parenthesis after the
throw
key to be incorrectly highlighted as an error.Code snippet
Screenshot