Skip to content

Brace followed by comment conversion bug #337

@chrisvelevitch

Description

@chrisvelevitch

If a brace is followed by a comment on the next line, the brace is removed and added the end of the comment and now the code is missing a brace and is no longer compilable.

as3 code for example:

if(this._explicitWidth !== this._explicitWidth && //isNaN
    (this.actualWidth > value || this.actualWidth == oldValue))
{
    //only invalidate if this change might affect the width
    this.invalidate(INVALIDATION_FLAG_SIZE);
}

expected result

if(this._explicitWidth != this._explicitWidth && //isNaN
    (this.actualWidth > value || this.actualWidth == oldValue))
{
    //only invalidate if this change might affect the width
    this.invalidate(INVALIDATION_FLAG_SIZE);
}

actual result

if (this._explicitWidth != this._explicitWidth &&  //isNaN  
    (this.actualWidth > value || this.actualWidth == oldValue))

//only invalidate if this change might affect the width{
    
    this.invalidate(INVALIDATION_FLAG_SIZE);
}

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