Test for multiple salsa assignment-declarations

This commit is contained in:
Nathan Shively-Sanders 2016-07-08 09:40:54 -07:00
parent 4721b91527
commit f84b731911
4 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,17 @@
//// [input.js]
function C() {
this.m = null;
}
C.prototype.m = function() {
this.nothing();
};
//// [output.js]
function C() {
this.m = null;
}
C.prototype.m = function () {
this.nothing();
};

View file

@ -0,0 +1,17 @@
=== tests/cases/conformance/salsa/input.js ===
function C() {
>C : Symbol(C, Decl(input.js, 0, 0))
this.m = null;
>m : Symbol(C.m, Decl(input.js, 1, 14), Decl(input.js, 3, 1))
}
C.prototype.m = function() {
>C.prototype : Symbol(C.m, Decl(input.js, 1, 14), Decl(input.js, 3, 1))
>C : Symbol(C, Decl(input.js, 0, 0))
>prototype : Symbol(Function.prototype, Decl(lib.d.ts, --, --))
>m : Symbol(C.m, Decl(input.js, 1, 14), Decl(input.js, 3, 1))
this.nothing();
};

View file

@ -0,0 +1,29 @@
=== tests/cases/conformance/salsa/input.js ===
function C() {
>C : () => void
this.m = null;
>this.m = null : null
>this.m : any
>this : any
>m : any
>null : null
}
C.prototype.m = function() {
>C.prototype.m = function() { this.nothing();} : () => void
>C.prototype.m : any
>C.prototype : any
>C : () => void
>prototype : any
>m : any
>function() { this.nothing();} : () => void
this.nothing();
>this.nothing() : any
>this.nothing : any
>this : { m: () => void; }
>nothing : any
};

View file

@ -0,0 +1,10 @@
// @filename: input.js
// @out: output.js
// @allowJs: true
function C() {
this.m = null;
}
C.prototype.m = function() {
this.nothing();
};