mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
86 lines
1.1 KiB
TypeScript
86 lines
1.1 KiB
TypeScript
//// [tests/cases/compiler/duplicateClassElements.ts] ////
|
|
|
|
//// [duplicateClassElements.ts]
|
|
class a {
|
|
public a;
|
|
public a;
|
|
public b() {
|
|
}
|
|
public b() {
|
|
}
|
|
public x;
|
|
get x() {
|
|
return 10;
|
|
}
|
|
set x(_x: number) {
|
|
}
|
|
|
|
get y() {
|
|
return "Hello";
|
|
}
|
|
set y(_y: string) {
|
|
}
|
|
|
|
public z() {
|
|
}
|
|
get z() {
|
|
return "Hello";
|
|
}
|
|
set z(_y: string) {
|
|
}
|
|
|
|
get x2() {
|
|
return 10;
|
|
}
|
|
set x2(_x: number) {
|
|
}
|
|
public x2;
|
|
|
|
get z2() {
|
|
return "Hello";
|
|
}
|
|
set z2(_y: string) {
|
|
}
|
|
public z2() {
|
|
}
|
|
|
|
}
|
|
|
|
//// [duplicateClassElements.js]
|
|
"use strict";
|
|
class a {
|
|
b() {
|
|
}
|
|
b() {
|
|
}
|
|
get x() {
|
|
return 10;
|
|
}
|
|
set x(_x) {
|
|
}
|
|
get y() {
|
|
return "Hello";
|
|
}
|
|
set y(_y) {
|
|
}
|
|
z() {
|
|
}
|
|
get z() {
|
|
return "Hello";
|
|
}
|
|
set z(_y) {
|
|
}
|
|
get x2() {
|
|
return 10;
|
|
}
|
|
set x2(_x) {
|
|
}
|
|
get z2() {
|
|
return "Hello";
|
|
}
|
|
set z2(_y) {
|
|
}
|
|
z2() {
|
|
}
|
|
}
|