Skip to content

Spurious error BS1001? #700

@ZeeD

Description

@ZeeD

example snippet:

sub foo(flag as boolean)
    ' both cases set ret
    if flag
        ret = "foo"
    else
        ret = "bar"
    end if

    print ret
end sub

I have updated brighterscript from 0.57.2 to 0.58.0 and then now bsc triggers the error error BS1001: Cannot find name 'ret'. My understanding is that ret is actually been set, so bsc shouldn't trigger this error

(moreover I found this error in some libraries I use, like https://github.com/rokucommunity/roku-requests/blob/master/src/source/Requests.brs#L177 trigger the same BS1001 error, so it's a bit complex to fix myself)

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