Skip to content

Decompile return within the if-else block inside try-except format code fail #104

@waaaagit

Description

@waaaagit

python3.11

def test(a, b):
    try:
        if a/b:
            a=1
        else:
            a=2
    except:
        return 3
    return
def test(a, b):
    try:
        if a/b:
            a=1
        else:
            a=2
        return 0
    except:
        return 3
    return

The two cases above can be decompile correctly

def test(a, b):
    try:
        if a/b:
            a=1
            return 1
        else:
            a=2
    except:
        return 3
    return
def test(a, b):
    try:
        if a/b:
            a=1
        else:
            a=2
            return 2
    except:
        return 3
    return

The two cases above can't be decompile correctly

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