Minus operator confused with variable after new constructor
Closed this issue · 2 comments
felixhao28 commented
Current behavior
Expected:
Code:
class A {
void f() {
int a = new Date().getTime() - start.getTime();
}
}
Fix:
Change this line from
'end': '(?=;|\\)|,|:|}|\\+)'
to
'end': '(?=;|\\)|,|:|}|\\+|\\-)'
^^^
felixhao28 commented
Equal sign is also impacted for the same reason:
class A {
void f() {
new Integer(65535).floatValue() == 65535.0f
}
}
The full expansion of this regex might be '(?=;|\\)|,|:|}|\\-|\\+|\\*|\\/|%|!|&|\\||=)'
;
sadikovi commented
I will check, thanks.