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

fix(inline): Nullable value in a nested struct [LNG-160] #724

Merged
merged 10 commits into from
Jun 1, 2023

Conversation

DieMyst
Copy link
Member

@DieMyst DieMyst commented Jun 1, 2023

No description provided.

@linear
Copy link

linear bot commented Jun 1, 2023

LNG-160 Nullable value becomes nil in a nested object literal

aqua Main

export someFunc

data Nested:
    child: i64

data Res:
    nested: ?Nested

func res() -> Res:
    <- Res(
        nested=?[Nested(
            child=3
        )]
    )

func someFunc() -> Nested:
    r <- res()
    <- r.nested!
fluence run -f 'someFunc()'
{
  error_code: 10007,
  instruction: 'call %init_peer_id% ("callbackSrv" "response") [Res_obj_flat.$.[0]] ',
  message: "value '[]' does not contain element for idx = '0'",
  peer_id: '12D3KooWExkrWuoJNsJXj9V9pdtAhfjuKdVnC9HCzoxVLT1mhuft'
}

Expected:

fluence run -f 'someFunc()'
{
  child: 3
}

@DieMyst DieMyst added the e2e Run e2e workflow label Jun 1, 2023
@DieMyst DieMyst changed the title bug: nullable value in a nested struct [LNG-160] fix: Nullable value in a nested struct [LNG-160] Jun 1, 2023
@DieMyst DieMyst changed the title fix: Nullable value in a nested struct [LNG-160] fix(inline): Nullable value in a nested struct [LNG-160] Jun 1, 2023
@DieMyst DieMyst marked this pull request as ready for review June 1, 2023 13:24
@DieMyst DieMyst requested a review from InversionSpaces June 1, 2023 13:24
@DieMyst DieMyst enabled auto-merge (squash) June 1, 2023 15:44
@DieMyst DieMyst merged commit ddb758c into main Jun 1, 2023
@DieMyst DieMyst deleted the fix-option-in-struct branch June 1, 2023 15:54
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