Skip to content

Commit 0caa1f6

Browse files
committed
Emit trailing comments
1 parent c949543 commit 0caa1f6

File tree

448 files changed

+1709
-1703
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

448 files changed

+1709
-1703
lines changed

src/compiler/emitter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,6 +1930,7 @@ module ts {
19301930

19311931
function emitTrailingDeclarationComments(node: Declaration) {
19321932
var trailingComments = getTrailingComments(currentSourceFile.text, node.end);
1933+
emitComments(trailingComments, writer, writeComment);
19331934
}
19341935

19351936
if (compilerOptions.sourceMap) {

tests/baselines/reference/AmbientModuleAndAmbientWithSameNameAndCommonRoot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ var p = new A.Point(0, 0); // unexpected error here, bug 840000
2828
//// [test.js]
2929
var p;
3030
var p = A.Point.Origin;
31-
var p = new A.Point(0, 0);
31+
var p = new A.Point(0, 0);// unexpected error here, bug 840000

tests/baselines/reference/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ var A;
3737
//// [test.js]
3838
var p;
3939
var p = A.Point.Origin;
40-
var p = new A.Point(0, 0);
40+
var p = new A.Point(0, 0);// unexpected error here, bug 840000

tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndExportedFunctionThatShareAName.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ var Point = (function () {
3030
}
3131
Point.Origin = function () {
3232
return { x: 0, y: 0 };
33-
};
33+
};// unexpected error here bug 840246
3434
return Point;
3535
})();
3636
var Point;
3737
(function (Point) {
3838
function Origin() {
3939
return null;
4040
}
41-
Point.Origin = Origin;
41+
Point.Origin = Origin;//expected duplicate identifier error
4242
})(Point || (Point = {}));
4343
var A;
4444
(function (A) {
@@ -49,15 +49,15 @@ var A;
4949
}
5050
Point.Origin = function () {
5151
return { x: 0, y: 0 };
52-
};
52+
};// unexpected error here bug 840246
5353
return Point;
5454
})();
5555
A.Point = Point;
5656
(function (Point) {
5757
function Origin() {
5858
return "";
5959
}
60-
Point.Origin = Origin;
60+
Point.Origin = Origin;//expected duplicate identifier error
6161
})(A.Point || (A.Point = {}));
6262
var Point = A.Point;
6363
})(A || (A = {}));

tests/baselines/reference/ClassAndModuleThatMergeWithStaticFunctionAndNonExportedFunctionThatShareAName.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var Point;
3737
(function (Point) {
3838
function Origin() {
3939
return "";
40-
}
40+
}// not an error, since not exported
4141
})(Point || (Point = {}));
4242
var A;
4343
(function (A) {
@@ -55,7 +55,7 @@ var A;
5555
(function (Point) {
5656
function Origin() {
5757
return "";
58-
}
58+
}// not an error since not exported
5959
})(A.Point || (A.Point = {}));
6060
var Point = A.Point;
6161
})(A || (A = {}));

tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndExportedVarThatShareAName.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var Point = (function () {
3333
})();
3434
var Point;
3535
(function (Point) {
36-
Point.Origin = "";
36+
Point.Origin = "";//expected duplicate identifier error
3737
})(Point || (Point = {}));
3838
var A;
3939
(function (A) {
@@ -47,7 +47,7 @@ var A;
4747
})();
4848
A.Point = Point;
4949
(function (Point) {
50-
Point.Origin = "";
50+
Point.Origin = "";//expected duplicate identifier error
5151
})(A.Point || (A.Point = {}));
5252
var Point = A.Point;
5353
})(A || (A = {}));

tests/baselines/reference/ClassAndModuleThatMergeWithStaticVariableAndNonExportedVarThatShareAName.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var Point = (function () {
3333
})();
3434
var Point;
3535
(function (Point) {
36-
var Origin = "";
36+
var Origin = "";// not an error, since not exported
3737
})(Point || (Point = {}));
3838
var A;
3939
(function (A) {
@@ -47,7 +47,7 @@ var A;
4747
})();
4848
A.Point = Point;
4949
(function (Point) {
50-
var Origin = "";
50+
var Origin = "";// not an error since not exported
5151
})(A.Point || (A.Point = {}));
5252
var Point = A.Point;
5353
})(A || (A = {}));

tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ var X;
6969
//// [test.js]
7070
//var cl: { x: number; y: number; }
7171
var cl = new X.Y.Point(1, 1);
72-
var cl = X.Y.Point.Origin;
72+
var cl = X.Y.Point.Origin;// error not expected here same as bug 83996 ?
7373
//// [simple.js]
7474
var A = (function () {
7575
function A() {

tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ var fn;
6464
var fn = A.Point;
6565
var cl;
6666
var cl = A.Point();
67-
var cl = A.Point.Origin;
67+
var cl = A.Point.Origin;// not expected to be an error.
6868
//// [simple.js]
6969
var B;
7070
(function (B) {
@@ -78,7 +78,7 @@ var B;
7878
var Point = B.Point;
7979
})(B || (B = {}));
8080
var fn;
81-
var fn = B.Point;
81+
var fn = B.Point;// not expected to be an error. bug 840000: [corelang] Function of fundule not assignalbe as expected
8282
var cl;
8383
var cl = B.Point();
8484
var cl = B.Point.Origin;

tests/baselines/reference/InvalidNonInstantiatedModule.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ var x: typeof M; // Error only a namespace
99

1010

1111
//// [InvalidNonInstantiatedModule.js]
12-
var m = M;
13-
var x;
12+
var m = M;// Error, not instantiated can not be used as var
13+
var x;// Error only a namespace

0 commit comments

Comments
 (0)