Skip to content

Commit 285b537

Browse files
committed
Add a test
1 parent e76d594 commit 285b537

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/test/converter2/issues/gh2495.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export interface IAnimal {
2+
name: number;
3+
}
4+
5+
export interface IFish extends IAnimal {
6+
maxDepth: number;
7+
}
8+
9+
export class IFish implements IFish {}

src/test/issues.c2.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
} from "./programs";
2929
import { TestLogger } from "./TestLogger";
3030
import { getComment, getLinks, query, querySig } from "./utils";
31+
import { DefaultTheme, PageEvent } from "..";
3132

3233
const base = getConverter2Base();
3334
const app = getConverter2App();
@@ -1372,4 +1373,14 @@ describe("Issue Tests", () => {
13721373

13731374
equal(project.children[0].children?.map((c) => c.name), ["Options"]);
13741375
});
1376+
1377+
it("Does not crash when rendering recursive hierarchy, #2495", () => {
1378+
const project = convert();
1379+
1380+
const theme = new DefaultTheme(app.renderer);
1381+
const page = new PageEvent("hierarchy", project);
1382+
page.project = project;
1383+
const context = theme.getRenderContext(page);
1384+
context.hierarchyTemplate(page);
1385+
});
13751386
});

0 commit comments

Comments
 (0)