TypeScript/tests/baselines/reference/propertyAndFunctionWithSameName.js
2015-12-08 17:51:10 -08:00

29 lines
465 B
TypeScript

//// [propertyAndFunctionWithSameName.ts]
class C {
x: number;
x() { // error
return 1;
}
}
class D {
x: number;
x(v) { } // error
}
//// [propertyAndFunctionWithSameName.js]
var C = (function () {
function C() {
}
C.prototype.x = function () {
return 1;
};
return C;
}());
var D = (function () {
function D() {
}
D.prototype.x = function (v) { }; // error
return D;
}());