Skip to content

context() built-in is not properly handled #40

@nikku

Description

@nikku

Is your feature request related to a problem? Please describe

In the following statemet I expect ctx to yield a context, rather than a list of elements, as a result, due to the types presented number is 1.

{
  ctx: context([ { key: "a+", value: 1 } ]),
  number: ctx.a+
}

Cf. playground link.

This uses the context sensitive nature of FEEL to test for special names that are only known (and thereby recognized) by the context.

Describe the solution you'd like

context() is constructed from available data; if available keys are sourced, and the result is typed.

Describe alternatives you've considered

None. Right now context() returns the argument type, which is [ { key, value } ]. This is very misleading.

Additional context

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions