Accept baselines: better comment output

This commit is contained in:
Mohamed Hegazy
2016-04-12 16:32:24 -07:00
parent b9c311cffe
commit 00a4aab88d
13 changed files with 27 additions and 24 deletions

View File

@@ -33,8 +33,8 @@ var Point = (function () {
}());
var Point;
(function (Point) {
function Origin() { return null; }
Point.Origin = Origin; //expected duplicate identifier error
function Origin() { return null; } //expected duplicate identifier error
Point.Origin = Origin;
})(Point || (Point = {}));
var A;
(function (A) {
@@ -49,7 +49,7 @@ var A;
A.Point = Point;
var Point;
(function (Point) {
function Origin() { return ""; }
Point.Origin = Origin; //expected duplicate identifier error
function Origin() { return ""; } //expected duplicate identifier error
Point.Origin = Origin;
})(Point = A.Point || (A.Point = {}));
})(A || (A = {}));

View File

@@ -12,6 +12,6 @@ var M;
function C() {
}
return C;
}());
M.C = C; // this should be an unresolved symbol I error
}()); // this should be an unresolved symbol I error
M.C = C;
})(M || (M = {}));

View File

@@ -48,7 +48,8 @@ var b = {
foo: function (x) {
if (x === void 0) { x = 1; }
},
foo: function (x) {
foo: // error
function (x) {
if (x === void 0) { x = 1; }
}
};

View File

@@ -10,6 +10,7 @@ export default {
//// [declarationEmit_inferedDefaultExportType.js]
"use strict";
exports.__esModule = true;
// test.ts
exports["default"] = {
foo: [],
bar: undefined,

View File

@@ -73,8 +73,8 @@ var M;
function f() {
}
return f;
}());
M.f = f; // error
}()); // error
M.f = f;
})(M || (M = {}));
var M;
(function (M) {
@@ -86,8 +86,8 @@ var M;
function g() {
}
return g;
}());
M.g = g; // no error
}()); // no error
M.g = g;
})(M || (M = {}));
var M;
(function (M) {

View File

@@ -92,8 +92,8 @@ define(["require", "exports"], function (require, exports) {
(function (F) {
var t;
})(F || (F = {}));
function F() { }
M.F = F; // Only one error for duplicate identifier (don't consider visibility)
function F() { } // Only one error for duplicate identifier (don't consider visibility)
M.F = F;
})(M || (M = {}));
var M;
(function (M) {

View File

@@ -41,9 +41,9 @@ var b = function () {
};
};
function baz() {
(() => {
() => {
var arg = arguments[0];
});
};
}
function foo(inputFunc) { }
foo(() => {
@@ -52,8 +52,8 @@ foo(() => {
function bar() {
var arg = arguments[0]; // no error
}
(() => {
() => {
function foo() {
var arg = arguments[0]; // no error
}
});
};

View File

@@ -44,7 +44,7 @@ function fn2() {
}
finally { } // error missing try
try {
} // error missing try
}
catch (x) { } // error missing try
// no error
try {

View File

@@ -5,7 +5,7 @@ class C {
//// [modifierOnParameter1.js]
var C = (function () {
function C() {
function C(p) {
}
return C;
}());

View File

@@ -19,7 +19,7 @@ var Chain = (function () {
Chain.prototype.then = function (cb) {
var result = cb(this.value);
// should get a fresh type parameter which each then call
var z = this.then(function (x) { return result; }) /*S*/.then(function (x) { return "abc"; }) /*string*/.then(function (x) { return x.length; }); // No error
var z = this.then(function (x) { return result; }) /*S*/.then(function (x) { return "abc"; }) /*string*/.then(function (x) { return x.length; }) /*number*/; // No error
return new Chain(result);
};
return Chain;

View File

@@ -19,7 +19,7 @@ var Chain2 = (function () {
Chain2.prototype.then = function (cb) {
var result = cb(this.value);
// should get a fresh type parameter which each then call
var z = this.then(function (x) { return result; }) /*S*/.then(function (x) { return "abc"; }) /*Function*/.then(function (x) { return x.length; }); // Should error on "abc" because it is not a Function
var z = this.then(function (x) { return result; }) /*S*/.then(function (x) { return "abc"; }) /*Function*/.then(function (x) { return x.length; }) /*number*/; // Should error on "abc" because it is not a Function
return new Chain2(result);
};
return Chain2;

View File

@@ -14,7 +14,7 @@ A.a();
var A;
(function (A) {
function b() { }
function a() { A.b(); }
A.a = a; // A.b should be an unresolved symbol error
function a() { A.b(); } // A.b should be an unresolved symbol error
A.a = a;
})(A || (A = {}));
A.a();

View File

@@ -103,7 +103,8 @@ var C = (function () {
function C() {
} // ok
Object.defineProperty(C.prototype, "X", {
get: function () {
get: // error
function () {
return '';
},
set: function (v) { } // ok