|
| 1 | +=== tests/cases/compiler/declarationEmitLocalClassDeclarationMixin.ts === |
| 2 | +interface Constructor<C> { new (...args: any[]): C; } |
| 3 | +>Constructor : Symbol(Constructor, Decl(declarationEmitLocalClassDeclarationMixin.ts, 0, 0)) |
| 4 | +>C : Symbol(C, Decl(declarationEmitLocalClassDeclarationMixin.ts, 0, 22)) |
| 5 | +>args : Symbol(args, Decl(declarationEmitLocalClassDeclarationMixin.ts, 0, 32)) |
| 6 | +>C : Symbol(C, Decl(declarationEmitLocalClassDeclarationMixin.ts, 0, 22)) |
| 7 | + |
| 8 | +function mixin<B extends Constructor<{}>>(Base: B) { |
| 9 | +>mixin : Symbol(mixin, Decl(declarationEmitLocalClassDeclarationMixin.ts, 0, 53)) |
| 10 | +>B : Symbol(B, Decl(declarationEmitLocalClassDeclarationMixin.ts, 2, 15)) |
| 11 | +>Constructor : Symbol(Constructor, Decl(declarationEmitLocalClassDeclarationMixin.ts, 0, 0)) |
| 12 | +>Base : Symbol(Base, Decl(declarationEmitLocalClassDeclarationMixin.ts, 2, 42)) |
| 13 | +>B : Symbol(B, Decl(declarationEmitLocalClassDeclarationMixin.ts, 2, 15)) |
| 14 | + |
| 15 | + class PrivateMixed extends Base { |
| 16 | +>PrivateMixed : Symbol(PrivateMixed, Decl(declarationEmitLocalClassDeclarationMixin.ts, 2, 52)) |
| 17 | +>Base : Symbol(Base, Decl(declarationEmitLocalClassDeclarationMixin.ts, 2, 42)) |
| 18 | + |
| 19 | + bar = 2; |
| 20 | +>bar : Symbol(PrivateMixed.bar, Decl(declarationEmitLocalClassDeclarationMixin.ts, 3, 37)) |
| 21 | + } |
| 22 | + return PrivateMixed; |
| 23 | +>PrivateMixed : Symbol(PrivateMixed, Decl(declarationEmitLocalClassDeclarationMixin.ts, 2, 52)) |
| 24 | +} |
| 25 | + |
| 26 | +export class Unmixed { |
| 27 | +>Unmixed : Symbol(Unmixed, Decl(declarationEmitLocalClassDeclarationMixin.ts, 7, 1)) |
| 28 | + |
| 29 | + foo = 1; |
| 30 | +>foo : Symbol(Unmixed.foo, Decl(declarationEmitLocalClassDeclarationMixin.ts, 9, 22)) |
| 31 | +} |
| 32 | + |
| 33 | +export const Mixed = mixin(Unmixed); |
| 34 | +>Mixed : Symbol(Mixed, Decl(declarationEmitLocalClassDeclarationMixin.ts, 13, 12)) |
| 35 | +>mixin : Symbol(mixin, Decl(declarationEmitLocalClassDeclarationMixin.ts, 0, 53)) |
| 36 | +>Unmixed : Symbol(Unmixed, Decl(declarationEmitLocalClassDeclarationMixin.ts, 7, 1)) |
| 37 | + |
| 38 | +function Filter<C extends Constructor<{}>>(ctor: C) { |
| 39 | +>Filter : Symbol(Filter, Decl(declarationEmitLocalClassDeclarationMixin.ts, 13, 36)) |
| 40 | +>C : Symbol(C, Decl(declarationEmitLocalClassDeclarationMixin.ts, 15, 16)) |
| 41 | +>Constructor : Symbol(Constructor, Decl(declarationEmitLocalClassDeclarationMixin.ts, 0, 0)) |
| 42 | +>ctor : Symbol(ctor, Decl(declarationEmitLocalClassDeclarationMixin.ts, 15, 43)) |
| 43 | +>C : Symbol(C, Decl(declarationEmitLocalClassDeclarationMixin.ts, 15, 16)) |
| 44 | + |
| 45 | + abstract class FilterMixin extends ctor { |
| 46 | +>FilterMixin : Symbol(FilterMixin, Decl(declarationEmitLocalClassDeclarationMixin.ts, 15, 53)) |
| 47 | +>ctor : Symbol(ctor, Decl(declarationEmitLocalClassDeclarationMixin.ts, 15, 43)) |
| 48 | + |
| 49 | + abstract match(path: string): boolean; |
| 50 | +>match : Symbol(FilterMixin.match, Decl(declarationEmitLocalClassDeclarationMixin.ts, 16, 45)) |
| 51 | +>path : Symbol(path, Decl(declarationEmitLocalClassDeclarationMixin.ts, 17, 23)) |
| 52 | + |
| 53 | + // other concrete methods, fields, constructor |
| 54 | + thing = 12; |
| 55 | +>thing : Symbol(FilterMixin.thing, Decl(declarationEmitLocalClassDeclarationMixin.ts, 17, 46)) |
| 56 | + } |
| 57 | + return FilterMixin; |
| 58 | +>FilterMixin : Symbol(FilterMixin, Decl(declarationEmitLocalClassDeclarationMixin.ts, 15, 53)) |
| 59 | +} |
| 60 | + |
| 61 | +export class FilteredThing extends Filter(Unmixed) { |
| 62 | +>FilteredThing : Symbol(FilteredThing, Decl(declarationEmitLocalClassDeclarationMixin.ts, 22, 1)) |
| 63 | +>Filter : Symbol(Filter, Decl(declarationEmitLocalClassDeclarationMixin.ts, 13, 36)) |
| 64 | +>Unmixed : Symbol(Unmixed, Decl(declarationEmitLocalClassDeclarationMixin.ts, 7, 1)) |
| 65 | + |
| 66 | + match(path: string) { |
| 67 | +>match : Symbol(FilteredThing.match, Decl(declarationEmitLocalClassDeclarationMixin.ts, 24, 52)) |
| 68 | +>path : Symbol(path, Decl(declarationEmitLocalClassDeclarationMixin.ts, 25, 10)) |
| 69 | + |
| 70 | + return false; |
| 71 | + } |
| 72 | +} |
| 73 | + |
0 commit comments