Bug 551632 - Formatter doesn't correctly handle static keyword for lambda and arrow functions
Summary: Formatter doesn't correctly handle static keyword for lambda and arrow functions
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-30 10:03 EDT by Thierry BLIND CLA
Modified: 2020-05-14 11:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry BLIND CLA 2019-09-30 10:03:32 EDT
Hi,

step to reproduce:
1. create a PHP file with following content:
<?php
static fn &($x) => $x;
static function &($x) { $x; }
?>

2. format the file, the word "static" will be doubled:
<?php
static static fn &($x) => $x;
static static function &($x) {
    $x;
}?>

Thierry.
Comment 1 Eclipse Genie CLA 2019-09-30 11:24:35 EDT
New Gerrit change created: https://git.eclipse.org/r/150392
Comment 3 Thierry BLIND CLA 2019-09-30 11:53:20 EDT
Fixed.
Comment 4 Eclipse Genie CLA 2019-10-11 03:55:13 EDT
New Gerrit change created: https://git.eclipse.org/r/150935