Skip to content

Commit

Permalink
Add override specifier to typescript copyfrom codegen
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Phlosioneer authored and ericvergnaud committed Mar 19, 2024
1 parent 6ba4f8c commit 4a1963b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ export class <struct.escapedName> extends <if(contextSuperClass)><contextSuperCl
return <parser.name>.RULE_<struct.derivedFromName>;
}
<if(struct.provideCopyFrom)><! don't need copy unless we have subclasses !>
public copyFrom(ctx: <struct.name>): void {
public override copyFrom(ctx: <struct.name>): void {
super.copyFrom(ctx);
<struct.attrs:{a | this.<a.escapedName> = ctx.<a.escapedName>;}; separator="\n">
}
Expand Down

0 comments on commit 4a1963b

Please sign in to comment.