|
| 1 | +=== tests/cases/conformance/decorators/class/a.ts === |
| 2 | +function decorator() { |
| 3 | +>decorator : Symbol(decorator, Decl(a.ts, 0, 0)) |
| 4 | + |
| 5 | + return (target: new (...args: any[]) => any) => {} |
| 6 | +>target : Symbol(target, Decl(a.ts, 1, 12)) |
| 7 | +>args : Symbol(args, Decl(a.ts, 1, 25)) |
| 8 | +} |
| 9 | + |
| 10 | +@decorator() |
| 11 | +>decorator : Symbol(decorator, Decl(a.ts, 0, 0)) |
| 12 | + |
| 13 | +class Foo { |
| 14 | +>Foo : Symbol(Foo, Decl(a.ts, 2, 1)) |
| 15 | + |
| 16 | + public static func(): Foo { |
| 17 | +>func : Symbol(Foo.func, Decl(a.ts, 5, 11)) |
| 18 | +>Foo : Symbol(Foo, Decl(a.ts, 2, 1)) |
| 19 | + |
| 20 | + return new Foo(); |
| 21 | +>Foo : Symbol(Foo, Decl(a.ts, 2, 1)) |
| 22 | + } |
| 23 | +} |
| 24 | +Foo.func(); |
| 25 | +>Foo.func : Symbol(Foo.func, Decl(a.ts, 5, 11)) |
| 26 | +>Foo : Symbol(Foo, Decl(a.ts, 2, 1)) |
| 27 | +>func : Symbol(Foo.func, Decl(a.ts, 5, 11)) |
| 28 | + |
| 29 | +try { |
| 30 | + @decorator() |
| 31 | +>decorator : Symbol(decorator, Decl(a.ts, 0, 0)) |
| 32 | + |
| 33 | + class Foo { |
| 34 | +>Foo : Symbol(Foo, Decl(a.ts, 12, 5)) |
| 35 | + |
| 36 | + public static func(): Foo { |
| 37 | +>func : Symbol(Foo.func, Decl(a.ts, 14, 15)) |
| 38 | +>Foo : Symbol(Foo, Decl(a.ts, 12, 5)) |
| 39 | + |
| 40 | + return new Foo(); |
| 41 | +>Foo : Symbol(Foo, Decl(a.ts, 12, 5)) |
| 42 | + } |
| 43 | + } |
| 44 | + Foo.func(); |
| 45 | +>Foo.func : Symbol(Foo.func, Decl(a.ts, 14, 15)) |
| 46 | +>Foo : Symbol(Foo, Decl(a.ts, 12, 5)) |
| 47 | +>func : Symbol(Foo.func, Decl(a.ts, 14, 15)) |
| 48 | +} |
| 49 | +catch (e) {} |
| 50 | +>e : Symbol(e, Decl(a.ts, 21, 7)) |
| 51 | + |
0 commit comments