2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/instantiatedBaseTypeConstraints.ts (1 errors) ====
|
|
|
|
interface Foo<T extends Foo<T, C>, C> {
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2313: Constraint of a type parameter cannot reference any type parameter from the same type parameter list.
|
2014-07-13 01:04:16 +02:00
|
|
|
foo(bar: C): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Bar implements Foo<Bar, string> {
|
|
|
|
foo(bar: string): void {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|