mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
26 lines
421 B
TypeScript
26 lines
421 B
TypeScript
//// [tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts] ////
|
|
|
|
//// [propertyAndFunctionWithSameName.ts]
|
|
class C {
|
|
x: number;
|
|
x() { // error
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
class D {
|
|
x: number;
|
|
x(v) { } // error
|
|
}
|
|
|
|
//// [propertyAndFunctionWithSameName.js]
|
|
"use strict";
|
|
class C {
|
|
x() {
|
|
return 1;
|
|
}
|
|
}
|
|
class D {
|
|
x(v) { } // error
|
|
}
|