diff --git a/lib/parse.js b/lib/parse.js index 55333b54e..3e0cd8b13 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -2551,7 +2551,7 @@ function parse($TEXT, options) { }; const is_not_method_start = () => - !is("punc", "(") && !is("punc", ",") && !is("punc", "}") && !is("operator", "="); + !is("punc", "(") && !is("punc", ",") && !is("punc", "}") && !is("punc", ";") && !is("operator", "="); var is_async = false; var is_static = false; diff --git a/test/compress/class-properties.js b/test/compress/class-properties.js index 0fda90bb4..b98d31aa7 100644 --- a/test/compress/class-properties.js +++ b/test/compress/class-properties.js @@ -9,11 +9,13 @@ basic_class_properties: { = "P" another = "A"; + get; + set = "S"; #private; - #private2 = "SS"; + #private2 = "S"; toString() { if ('bar' in this && 'foo' in A) { - return A.fil + this.another + this.#private2 + return A.fil + this.another + this.set + this.#private2 } } }