From 2336054f8a9c70b3f978f4e779d5b6aa9cfed083 Mon Sep 17 00:00:00 2001 From: Christian Zosel Date: Wed, 4 Dec 2024 23:00:55 +0100 Subject: [PATCH] fix: incorrect version numbers --- src/parser/class.js | 2 +- test/snapshot/classconstant.test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser/class.js b/src/parser/class.js index 996f5acf3..c71239740 100644 --- a/src/parser/class.js +++ b/src/parser/class.js @@ -235,7 +235,7 @@ module.exports = { } const [nullable, type] = - this.version >= 830 ? this.read_optional_type() : [false, null]; + this.version >= 803 ? this.read_optional_type() : [false, null]; const result = this.node("classconstant"); const items = this.read_list( diff --git a/test/snapshot/classconstant.test.js b/test/snapshot/classconstant.test.js index 8e5557ede..e41251c46 100644 --- a/test/snapshot/classconstant.test.js +++ b/test/snapshot/classconstant.test.js @@ -43,7 +43,7 @@ describe("classconstant", () => { expect( parser.parseEval( 'class Foo { public const string CONSTANT = "Hello world!"; }', - { parser: { version: 830 } }, + { parser: { version: 803 } }, ), ).toMatchSnapshot(); }); @@ -51,7 +51,7 @@ describe("classconstant", () => { expect(() => parser.parseEval( 'class Foo { public const string CONSTANT = "Hello world!"; }', - { parser: { version: 820 } }, + { parser: { version: 802 } }, ), ).toThrowErrorMatchingSnapshot(); });