Skip to content

Add support for computed fields in CompositeValue #660

Closed

Description

Issue To Be Solved

CompositeValue currently only supports stored fields.

Some built-in ("native") composite values have computed fields.

Add support for computed fields to CompositeValue, so it can be used to represent built-in values.

Suggested Solution

  • Add a field computedFields to CompositeValue, which has an ordered map of string to func() Value entries
  • On member access, also look up the requested member name in computedFields
  • Tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions