TypeScript/tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts
2014-07-12 17:30:19 -07:00

34 lines
No EOL
404 B
TypeScript

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) { }
}