Skip to content

Commit f84b731

Browse files
committed
Test for multiple salsa assignment-declarations
1 parent 4721b91 commit f84b731

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//// [input.js]
2+
3+
function C() {
4+
this.m = null;
5+
}
6+
C.prototype.m = function() {
7+
this.nothing();
8+
};
9+
10+
11+
//// [output.js]
12+
function C() {
13+
this.m = null;
14+
}
15+
C.prototype.m = function () {
16+
this.nothing();
17+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
=== tests/cases/conformance/salsa/input.js ===
2+
3+
function C() {
4+
>C : Symbol(C, Decl(input.js, 0, 0))
5+
6+
this.m = null;
7+
>m : Symbol(C.m, Decl(input.js, 1, 14), Decl(input.js, 3, 1))
8+
}
9+
C.prototype.m = function() {
10+
>C.prototype : Symbol(C.m, Decl(input.js, 1, 14), Decl(input.js, 3, 1))
11+
>C : Symbol(C, Decl(input.js, 0, 0))
12+
>prototype : Symbol(Function.prototype, Decl(lib.d.ts, --, --))
13+
>m : Symbol(C.m, Decl(input.js, 1, 14), Decl(input.js, 3, 1))
14+
15+
this.nothing();
16+
};
17+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
=== tests/cases/conformance/salsa/input.js ===
2+
3+
function C() {
4+
>C : () => void
5+
6+
this.m = null;
7+
>this.m = null : null
8+
>this.m : any
9+
>this : any
10+
>m : any
11+
>null : null
12+
}
13+
C.prototype.m = function() {
14+
>C.prototype.m = function() { this.nothing();} : () => void
15+
>C.prototype.m : any
16+
>C.prototype : any
17+
>C : () => void
18+
>prototype : any
19+
>m : any
20+
>function() { this.nothing();} : () => void
21+
22+
this.nothing();
23+
>this.nothing() : any
24+
>this.nothing : any
25+
>this : { m: () => void; }
26+
>nothing : any
27+
28+
};
29+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// @filename: input.js
2+
// @out: output.js
3+
// @allowJs: true
4+
5+
function C() {
6+
this.m = null;
7+
}
8+
C.prototype.m = function() {
9+
this.nothing();
10+
};

0 commit comments

Comments
 (0)