Skip to content

Stdlib methods do not have access to runtime bindings #75

@LeonPuchinger

Description

@LeonPuchinger

Methods in the standard library cannot currently access runtime bindings. In InvocationAstNode, it is determined whether the called function is a method by examining the parent symbol. However, the flags of the parent symbol are not checked for being part of the stdlib. This needs to be changed and ignoreRuntimeBindings needs to be set to false in the symbol table.

Example to reproduce the issue:

  • Create an Option that is set to an instance of Empty.
  • Call get_value() on the instance w/out checking for whether the Option contains a value.
  • This should trigger a call to runtime_panic inside the get_value method.
  • Problem: get_value does not have access to the runtime binding, even though Option is part of the stdlib and the flags are set correctly.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions