mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add test of stack overflow
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
=== tests/cases/conformance/salsa/a.js ===
|
||||
// #24131
|
||||
const a = {};
|
||||
>a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0))
|
||||
|
||||
a.d = function() {};
|
||||
>a.d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
|
||||
>a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0))
|
||||
>d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
|
||||
|
||||
=== tests/cases/conformance/salsa/b.js ===
|
||||
a.d.prototype = {};
|
||||
>a.d.prototype : Symbol(d.prototype, Decl(b.js, 0, 0))
|
||||
>a.d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
|
||||
>a : Symbol(a, Decl(a.js, 1, 5), Decl(a.js, 1, 13), Decl(b.js, 0, 0))
|
||||
>d : Symbol(d, Decl(a.js, 1, 13), Decl(b.js, 0, 2))
|
||||
>prototype : Symbol(d.prototype, Decl(b.js, 0, 0))
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
=== tests/cases/conformance/salsa/a.js ===
|
||||
// #24131
|
||||
const a = {};
|
||||
>a : { [x: string]: any; d: typeof d; }
|
||||
>{} : { [x: string]: any; d: typeof d; }
|
||||
|
||||
a.d = function() {};
|
||||
>a.d = function() {} : typeof d
|
||||
>a.d : typeof d
|
||||
>a : { [x: string]: any; d: typeof d; }
|
||||
>d : typeof d
|
||||
>function() {} : typeof d
|
||||
|
||||
=== tests/cases/conformance/salsa/b.js ===
|
||||
a.d.prototype = {};
|
||||
>a.d.prototype = {} : { [x: string]: any; }
|
||||
>a.d.prototype : { [x: string]: any; }
|
||||
>a.d : typeof d
|
||||
>a : { [x: string]: any; d: typeof d; }
|
||||
>d : typeof d
|
||||
>prototype : { [x: string]: any; }
|
||||
>{} : { [x: string]: any; }
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// @noEmit: true
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
|
||||
// #24131
|
||||
// @Filename: a.js
|
||||
const a = {};
|
||||
a.d = function() {};
|
||||
// @Filename: b.js
|
||||
a.d.prototype = {};
|
||||
Reference in New Issue
Block a user