Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
  • Loading branch information
2 people authored and ryoppippi committed Feb 1, 2024
1 parent 178b889 commit efda3be
Showing 2 changed files with 27 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/js_lexer_tables.zig
Original file line number Diff line number Diff line change
@@ -250,11 +250,12 @@ pub const PropertyModifierKeyword = enum {
});
};

pub const TypeScriptAccessibilityModifier = ComptimeStringMap(u1, .{
.{ "private", 1 },
.{ "protected", 1 },
.{ "public", 1 },
.{ "readonly", 1 },
pub const TypeScriptAccessibilityModifier = ComptimeStringMap(void, .{
.{ "override", void },
.{ "private", void },
.{ "protected", void },
.{ "public", void },
.{ "readonly", void },
});

pub const TokenEnumType = std.EnumArray(T, []u8);
21 changes: 21 additions & 0 deletions test/transpiler/7324.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { test, expect } from "bun:test";

test("override is an accessibility modifier", () => {
class FooParent {}

class FooChild extends FooParent {}

class BarParent {
constructor(readonly foo: FooParent) {}
}

class BarChild extends BarParent {
constructor(override foo: FooChild) {
super(foo);
}
}

new BarChild(new FooChild());

expect().pass();
});

0 comments on commit efda3be

Please sign in to comment.