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(compiler): Fix closure call compilation [fixes LNG-193] #741

Merged
merged 3 commits into from
Jun 13, 2023

Conversation

InversionSpaces
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Jun 12, 2023

LNG-193 Assignment does not work with closure return

Next snippet:

func foo(arg: u16) -> u16 -> u16:
  closure = func (x: u16) -> u16:
    <- x + arg
  <- closure

func main() -> u16:
  a = foo(42)
  b = 1 + a(2) + a(3)
  <- b

Makes compiler to write error log

CallArrowRawInliner.scala [ERROR] Inlining, cannot find arrow a, available: foo, closure

but compilation still succeeds with incorrect AIR.

@InversionSpaces InversionSpaces changed the title bug(compiler): Fix closure call compilation [fixes LNG-193] fix(compiler): Fix closure call compilation [fixes LNG-193] Jun 12, 2023
@InversionSpaces InversionSpaces added the e2e Run e2e workflow label Jun 12, 2023
@DieMyst
Copy link
Member

DieMyst commented Jun 12, 2023

add unit tests and prepare/check test in aqua-tests

@DieMyst DieMyst merged commit c5534a9 into main Jun 13, 2023
12 checks passed
@DieMyst DieMyst deleted the bugfix/closure-call branch June 13, 2023 09:56
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.

None yet

2 participants