Skip to content

BUG: CC0014 converts if y then x += 1 else x =1 to x +=(if(y, 1, 1) #798

Closed
@kwhitefoot

Description

@kwhitefoot

Bug

In cases where one branch of an if increments a variable and the other assigns a value to it then CC0014 should not offer a fix.

Dim s As String
If True Then
    s += "a"
Else
    s = "b"
End If

Current output after fix applied:

s += If(True, "a", "b")

Fix should go to branch v1.0.x.

@bergarces is working on it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions