mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
51 lines
2.4 KiB
Plaintext
51 lines
2.4 KiB
Plaintext
//// [tests/cases/compiler/circularConstraintYieldsAppropriateError.ts] ////
|
|
|
|
=== circularConstraintYieldsAppropriateError.ts ===
|
|
// https://github.com/Microsoft/TypeScript/issues/16861
|
|
class BaseType<T> {
|
|
>BaseType : Symbol(BaseType, Decl(circularConstraintYieldsAppropriateError.ts, 0, 0))
|
|
>T : Symbol(T, Decl(circularConstraintYieldsAppropriateError.ts, 1, 15))
|
|
|
|
bar: T
|
|
>bar : Symbol(BaseType.bar, Decl(circularConstraintYieldsAppropriateError.ts, 1, 19))
|
|
>T : Symbol(T, Decl(circularConstraintYieldsAppropriateError.ts, 1, 15))
|
|
}
|
|
|
|
class NextType<C extends { someProp: any }, T = C['someProp']> extends BaseType<T> {
|
|
>NextType : Symbol(NextType, Decl(circularConstraintYieldsAppropriateError.ts, 3, 1))
|
|
>C : Symbol(C, Decl(circularConstraintYieldsAppropriateError.ts, 5, 15))
|
|
>someProp : Symbol(someProp, Decl(circularConstraintYieldsAppropriateError.ts, 5, 26))
|
|
>T : Symbol(T, Decl(circularConstraintYieldsAppropriateError.ts, 5, 43))
|
|
>C : Symbol(C, Decl(circularConstraintYieldsAppropriateError.ts, 5, 15))
|
|
>BaseType : Symbol(BaseType, Decl(circularConstraintYieldsAppropriateError.ts, 0, 0))
|
|
>T : Symbol(T, Decl(circularConstraintYieldsAppropriateError.ts, 5, 43))
|
|
|
|
baz: string;
|
|
>baz : Symbol(NextType.baz, Decl(circularConstraintYieldsAppropriateError.ts, 5, 84))
|
|
}
|
|
|
|
class Foo extends NextType<Foo> {
|
|
>Foo : Symbol(Foo, Decl(circularConstraintYieldsAppropriateError.ts, 7, 1))
|
|
>NextType : Symbol(NextType, Decl(circularConstraintYieldsAppropriateError.ts, 3, 1))
|
|
>Foo : Symbol(Foo, Decl(circularConstraintYieldsAppropriateError.ts, 7, 1))
|
|
|
|
someProp: {
|
|
>someProp : Symbol(Foo.someProp, Decl(circularConstraintYieldsAppropriateError.ts, 9, 33))
|
|
|
|
test: true
|
|
>test : Symbol(test, Decl(circularConstraintYieldsAppropriateError.ts, 10, 15))
|
|
}
|
|
}
|
|
|
|
const foo = new Foo();
|
|
>foo : Symbol(foo, Decl(circularConstraintYieldsAppropriateError.ts, 15, 5))
|
|
>Foo : Symbol(Foo, Decl(circularConstraintYieldsAppropriateError.ts, 7, 1))
|
|
|
|
foo.bar.test
|
|
>foo.bar.test : Symbol(test, Decl(circularConstraintYieldsAppropriateError.ts, 10, 15))
|
|
>foo.bar : Symbol(BaseType.bar, Decl(circularConstraintYieldsAppropriateError.ts, 1, 19))
|
|
>foo : Symbol(foo, Decl(circularConstraintYieldsAppropriateError.ts, 15, 5))
|
|
>bar : Symbol(BaseType.bar, Decl(circularConstraintYieldsAppropriateError.ts, 1, 19))
|
|
>test : Symbol(test, Decl(circularConstraintYieldsAppropriateError.ts, 10, 15))
|
|
|