From 4a1963b3d2b9e39326fb26b08ae2761b4c8634ef Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 16 Mar 2024 17:28:46 -0400 Subject: [PATCH] Add override specifier to typescript copyfrom codegen Required for `"noImplicitOverride": true` typescript setting. I couldn't figure out how to add a test for this situation in the typescript test file. It only happens if a rule context class has a subclass. Signed-off-by: Phlosioneer --- .../antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg index 233900a5f3..4b1cb2c591 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg @@ -749,7 +749,7 @@ export class extends .RULE_; } - public copyFrom(ctx: ): void { + public override copyFrom(ctx: ): void { super.copyFrom(ctx); = ctx.;}; separator="\n"> }