Files
tsgo/testdata/baselines/reference/submodule/conformance/mergedInterfacesWithInheritedPrivates2.js

48 lines
772 B
TypeScript

//// [tests/cases/conformance/interfaces/declarationMerging/mergedInterfacesWithInheritedPrivates2.ts] ////
//// [mergedInterfacesWithInheritedPrivates2.ts]
class C {
private x!: number;
}
class C2 {
private w!: number;
}
interface A extends C {
y: string;
}
interface A extends C2 {
z: string;
}
class D extends C implements A { // error
private w!: number;
y!: string;
z!: string;
}
class E extends C2 implements A { // error
w!: number;
y!: string;
z!: string;
}
declare var a: A;
var r = a.x; // error
var r2 = a.w; // error
//// [mergedInterfacesWithInheritedPrivates2.js]
"use strict";
class C {
}
class C2 {
}
class D extends C {
}
class E extends C2 {
}
var r = a.x; // error
var r2 = a.w; // error