Skip to content

Commit 2d7efb3

Browse files
committed
Add test of stack overflow
1 parent c798e21 commit 2d7efb3

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
=== tests/cases/conformance/salsa/a.js ===
2+
// #24131
3+
const a = {};
4+
>a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0))
5+
6+
a.d = function() {};
7+
>a.d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
8+
>a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0))
9+
>d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
10+
11+
=== tests/cases/conformance/salsa/b.js ===
12+
a.d.prototype = {};
13+
>a.d.prototype : Symbol(d.prototype, Decl(b.js, 0, 0))
14+
>a.d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
15+
>a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0))
16+
>d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
17+
>prototype : Symbol(d.prototype, Decl(b.js, 0, 0))
18+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
=== tests/cases/conformance/salsa/a.js ===
2+
// #24131
3+
const a = {};
4+
>a : { [x: string]: any; d: typeof d; }
5+
>{} : { [x: string]: any; d: typeof d; }
6+
7+
a.d = function() {};
8+
>a.d = function() {} : typeof d
9+
>a.d : typeof d
10+
>a : { [x: string]: any; d: typeof d; }
11+
>d : typeof d
12+
>function() {} : typeof d
13+
14+
=== tests/cases/conformance/salsa/b.js ===
15+
a.d.prototype = {};
16+
>a.d.prototype = {} : { [x: string]: any; }
17+
>a.d.prototype : { [x: string]: any; }
18+
>a.d : typeof d
19+
>a : { [x: string]: any; d: typeof d; }
20+
>d : typeof d
21+
>prototype : { [x: string]: any; }
22+
>{} : { [x: string]: any; }
23+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// @noEmit: true
2+
// @allowJs: true
3+
// @checkJs: true
4+
5+
// #24131
6+
// @Filename: a.js
7+
const a = {};
8+
a.d = function() {};
9+
// @Filename: b.js
10+
a.d.prototype = {};

0 commit comments

Comments
 (0)