Closed abayer closed 7 years ago
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.
JENKINS-46191
Before this change, "String foo;" would result in
This is because in that scenario, the right hand side is an
EmptyExpression
, which ends up breaking all the things when you try to cast it to something else. So we shouldn't be trying to do a cast at all here, and instead just transform the declaration expression (which actually may not be needed itself, but better safe than sorry to still transform the left hand side's variable expression, which is basically all that will happen).cc @reviewbybees