TypeScript/tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts
2014-11-18 21:41:07 -08:00

35 lines
421 B
TypeScript

// @target: ES5
class C {
get x() { return 1; }
get x() { return 1; } // error
}
class D {
set x(v) { }
set x(v) { } // error
}
class E {
get x() {
return 1;
}
set x(v) { }
}
var x = {
get x() {
return 1;
},
// error
get x() {
return 1;
}
}
var y = {
get x() {
return 1;
},
set x(v) { }
}