Skip to content

Gracefully parse abstract class in expression position #17416

Description

TypeScript Version: 2.4.2 / nightly (2.5.0-dev.20170725)

Code

function f1() {
  return abstract class {}
}

function f2() {
  const x = abstract class {}
  return x
}

function f3() {
  abstract class x {}
  return x
}

Expected behavior:

No errors reported by the compiler.

Actual behavior:

some.ts(2,19): error TS1005: ';' expected.
some.ts(6,22): error TS1005: ',' expected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions