Skip to content

[v4] Rollup errors on semicolon after class method Cannot convert ClassMember::Empty #5171

Closed
@thepassle

Description

@thepassle

Rollup Version

4.0.0

Operating System (or Browser)

mac

Node Version (if applicable)

18

Link To Reproduction

https://rollupjs.org/repl/?version=4.0.0&shareable=JTdCJTIyZXhhbXBsZSUyMiUzQW51bGwlMkMlMjJtb2R1bGVzJTIyJTNBJTVCJTdCJTIyY29kZSUyMiUzQSUyMmV4cG9ydCUyMGNsYXNzJTIwRm9vJTIwJTdCJTVDbiUyMCUyMGJhcigpJTIwJTdCJTVDbiUyMCUyMCUyMCUyMGNvbnNvbGUubG9nKCdoaScpJTNCJTVDbiUyMCUyMCU3RCUzQiUyMCUyRiUyRiUyMCUzQy0tJTIwdGhpcyUyMGlzJTIwdGhlJTIwY3VscHJpdCU1Q24lN0QlNUNuJTIyJTJDJTIyaXNFbnRyeSUyMiUzQXRydWUlMkMlMjJuYW1lJTIyJTNBJTIybWFpbi5qcyUyMiU3RCU1RCUyQyUyMm9wdGlvbnMlMjIlM0ElN0IlMjJvdXRwdXQlMjIlM0ElN0IlMjJmb3JtYXQlMjIlM0ElMjJlcyUyMiU3RCUyQyUyMnRyZWVzaGFrZSUyMiUzQXRydWUlN0QlN0Q=

Expected Behaviour

Given the following code:

export class Foo {
  bar() {
    console.log('hi');
  }; // <-- this is the culprit
}

(note the semicolon)

The error I'm seeing is:

thread '<unnamed>' panicked at parse_ast/src/convert_ast/converter.rs:562:32:
not implemented: Cannot convert ClassMember::Empty
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
sh: line 1: 50188 Abort trap: 6           NODE_OPTIONS=--max-old-space-size=8192 rollup -c rollup/prod.config.mjs

Actual Behaviour

rollup doesnt crash :)

Activity

self-assigned this
on Oct 6, 2023
github-actions

github-actions commented on Oct 6, 2023

@github-actions

This issue has been resolved via #5173 as part of rollup@4.0.1. You can test it via npm install rollup.

thepassle

thepassle commented on Oct 6, 2023

@thepassle
Author

Quick work, thank you :)

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    [v4] Rollup errors on semicolon after class method `Cannot convert ClassMember::Empty` · Issue #5171 · rollup/rollup