Add test of stack overflow

This commit is contained in:
Nathan Shively-Sanders
2018-05-15 12:18:51 -07:00
parent c798e2109c
commit 2d7efb35b1
3 changed files with 51 additions and 0 deletions
@@ -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 = {};