Skip to content

Record types and try-catch-on #2406

Closed
@jensjoha

Description

@jensjoha

I've asked in the chat as well. Posting here to make it easier to find if needed later.

Currently

void foo() {
  try {
    ;
  } on Bar {
    ;
  }

  on(a, b, c) {
    ;
  }
  on(1, 2, 3);
}

is a try statement, then a local function declaration named on taking 3 parameters, then a call to that local function.

With record types this will instead parse as a try statement with a on specificRecordType clause, then a function call.

Any input?

/cc @lrhn @munificent @eernstg

Metadata

Metadata

Assignees

No one assigned

    Labels

    recordsIssues related to records.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions