Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: add name scopes to if/else/try blocks #715

Merged
merged 2 commits into from
May 17, 2023

Conversation

DieMyst
Copy link
Member

@DieMyst DieMyst commented May 17, 2023

fixes LNG-55

@linear
Copy link

linear bot commented May 17, 2023

LNG-55 Name scope for if/else is not isolated

code:

service MyOp("op"):
    identity(arg: string) -> string

func test() -> ?string:
    result: ?string
    if false:
        tmp <- MyOp.identity("tmp")

    if true:
        result <<- tmp

    <- result

command:

aqua run --addr /dns4/kras-04.fluence.dev/tcp/19001/wss/p2p/12D3KooWFEwNWcHqi9rtsmDhsYcDbRUCDXH84RC4FW6UfsFWaoHi --input src/aqua/export.aqua --func 'test()'

output:

Your peerId: 12D3KooWQa4Ta1q2PoJBDtP1Pg83AQynnueGyY6MDJhH8XWrjGX7
xor caught an error: variable with name 'tmp' wasn't defined during script execution
xor caught an error: variable with name 'tmp' wasn't defined during script execution
[]
xor caught an error: variable with name 'tmp' wasn't defined during script execution
xor caught an error: variable with name 'tmp' wasn't defined during script execution
xor caught an error: variable with name 'tmp' wasn't defined during script execution

@DieMyst DieMyst added the e2e Run e2e workflow label May 17, 2023
@DieMyst DieMyst marked this pull request as ready for review May 17, 2023 13:43
@DieMyst DieMyst requested a review from InversionSpaces May 17, 2023 13:44
@DieMyst DieMyst merged commit e4205df into main May 17, 2023
@DieMyst DieMyst deleted the LNG-55_isolated_scope_in_if branch May 17, 2023 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants