Skip to content

Validation error: Wrong context for call that produces multiple results #712

@lars-reimann

Description

@lars-reimann

Is your feature request related to a problem?

Currently, no error is shown here:

pipeline test{
    val a = [g()];
}

fun g() -> (r: Int, s: Int)

But calls that produce multiple results must only occur as

  1. the RHS of an assignment, or
  2. the receiver of a member access.

Desired solution

Add validation. Ideally, avoid overlap with errors from the type checker.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

Metadata

Metadata

Assignees

Labels

releasedIncluded in a releasevalidation ✔️Improved or new static checks

Type

No type

Projects

Status

✔️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions