mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 03:31:45 +03:00
35 lines
387 B
TypeScript
35 lines
387 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) { }
|
|
} |