Skip to content

Commit

Permalink
fix: when allowInheritance is true, java now renders setters in inter…
Browse files Browse the repository at this point in the history
…faces for enums if const is not set by the classes that implements it
  • Loading branch information
kennethaasan committed Sep 5, 2024
1 parent 5fe0976 commit 2ab0861
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/generators/AbstractGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ export abstract class AbstractGenerator<
}

private setParentsForModels(
constrainedModels: ConstrainedMetaModelWithDepManager[],
unionConstrainedModelsWithDepManager: ConstrainedMetaModelWithDepManager[],
constrainedModel: ConstrainedMetaModel
) {
for (const unionConstrainedModel of constrainedModels) {
for (const unionConstrainedModel of unionConstrainedModelsWithDepManager) {
if (
unionConstrainedModel.constrainedModel instanceof
ConstrainedUnionModel &&
Expand Down Expand Up @@ -219,7 +219,10 @@ export abstract class AbstractGenerator<

for (const { constrainedModel } of constrainedModels) {
this.setImplementedByForModels(constrainedModels, constrainedModel);
this.setParentsForModels(constrainedModels, constrainedModel);
this.setParentsForModels(
unionConstrainedModelsWithDepManager,
constrainedModel
);
}

return constrainedModels;
Expand Down

0 comments on commit 2ab0861

Please sign in to comment.