Skip to content

References in main aren't expanded when they're inside lists #643

@nicolas-abril

Description

@nicolas-abril

Reproducing the behavior

We want programs like the following to actually execute the functions in the list

def main():
  return [
    do_thing1,
    do_thing2,
    do_thing3,
  ]

This currently works for some things, like tuples, raw references or references behind lambdas, but not for lists or other constructors.

This leads to confusion for users, since they need to actually use those references for something, otherwise the functions are never executed. This is especially tricky in cases like the above, where we don't want to use the values, just return them.

System Settings

Bend commit 060239a

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompilationCompilation of terms and functions to HVM

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions