TypeScript/tests/baselines/reference/twoGenericInterfacesDifferingByTypeParameterName.errors.txt
2014-09-12 13:35:07 -07:00

79 lines
2.7 KiB
Plaintext

tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(7,11): error TS2428: All declarations of an interface must have identical type parameters.
tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(15,11): error TS2428: All declarations of an interface must have identical type parameters.
tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(24,15): error TS2428: All declarations of an interface must have identical type parameters.
tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(32,15): error TS2428: All declarations of an interface must have identical type parameters.
tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts(56,22): error TS2428: All declarations of an interface must have identical type parameters.
==== tests/cases/conformance/interfaces/declarationMerging/twoGenericInterfacesDifferingByTypeParameterName.ts (5 errors) ====
// type parameter names are relevant when choosing whether to merge interface declarations
interface A<T> {
x: T;
}
interface A<U> { // error
~
!!! error TS2428: All declarations of an interface must have identical type parameters.
y: U;
}
interface B<T,U> {
x: U;
}
interface B<T,V> { // error
~
!!! error TS2428: All declarations of an interface must have identical type parameters.
y: V;
}
module M {
interface A<T> {
x: T;
}
interface A<U> { // error
~
!!! error TS2428: All declarations of an interface must have identical type parameters.
y: U;
}
interface B<T, U> {
x: U;
}
interface B<T, V> { // error
~
!!! error TS2428: All declarations of an interface must have identical type parameters.
y: V;
}
}
module M2 {
interface B<T, U> {
x: U;
}
}
module M2 {
interface B<T, V> { // ok, different declaration space than other M2
y: V;
}
}
module M3 {
export interface B<T, U> {
x: U;
}
}
module M3 {
export interface B<T, V> { // error
~
!!! error TS2428: All declarations of an interface must have identical type parameters.
y: V;
}
}