|
| 1 | +=== tests/cases/compiler/first.ts === |
| 2 | +declare function mix<TMix>(mixin: TMix): TMix; |
| 3 | +>mix : Symbol(mix, Decl(first.ts, 0, 0)) |
| 4 | +>TMix : Symbol(TMix, Decl(first.ts, 0, 21)) |
| 5 | +>mixin : Symbol(mixin, Decl(first.ts, 0, 27)) |
| 6 | +>TMix : Symbol(TMix, Decl(first.ts, 0, 21)) |
| 7 | +>TMix : Symbol(TMix, Decl(first.ts, 0, 21)) |
| 8 | + |
| 9 | +const DisposableMixin = class { |
| 10 | +>DisposableMixin : Symbol(DisposableMixin, Decl(first.ts, 2, 5)) |
| 11 | + |
| 12 | + protected _onDispose() { |
| 13 | +>_onDispose : Symbol(DisposableMixin._onDispose, Decl(first.ts, 2, 31)) |
| 14 | + |
| 15 | + this._assertIsStripped() |
| 16 | +>this._assertIsStripped : Symbol(DisposableMixin._assertIsStripped, Decl(first.ts, 5, 5)) |
| 17 | +>this : Symbol(DisposableMixin, Decl(first.ts, 2, 23)) |
| 18 | +>_assertIsStripped : Symbol(DisposableMixin._assertIsStripped, Decl(first.ts, 5, 5)) |
| 19 | + } |
| 20 | + private _assertIsStripped() { |
| 21 | +>_assertIsStripped : Symbol(DisposableMixin._assertIsStripped, Decl(first.ts, 5, 5)) |
| 22 | + } |
| 23 | +}; |
| 24 | + |
| 25 | +// No error, but definition is wrong. |
| 26 | +export default mix(DisposableMixin); |
| 27 | +>mix : Symbol(mix, Decl(first.ts, 0, 0)) |
| 28 | +>DisposableMixin : Symbol(DisposableMixin, Decl(first.ts, 2, 5)) |
| 29 | + |
| 30 | +export class Monitor extends mix(DisposableMixin) { |
| 31 | +>Monitor : Symbol(Monitor, Decl(first.ts, 11, 36)) |
| 32 | +>mix : Symbol(mix, Decl(first.ts, 0, 0)) |
| 33 | +>DisposableMixin : Symbol(DisposableMixin, Decl(first.ts, 2, 5)) |
| 34 | + |
| 35 | + protected _onDispose() { |
| 36 | +>_onDispose : Symbol(Monitor._onDispose, Decl(first.ts, 12, 51)) |
| 37 | + } |
| 38 | +} |
| 39 | + |
| 40 | +=== tests/cases/compiler/another.ts === |
| 41 | +declare function mix<TMix>(mixin: TMix): TMix; |
| 42 | +>mix : Symbol(mix, Decl(another.ts, 0, 0)) |
| 43 | +>TMix : Symbol(TMix, Decl(another.ts, 0, 21)) |
| 44 | +>mixin : Symbol(mixin, Decl(another.ts, 0, 27)) |
| 45 | +>TMix : Symbol(TMix, Decl(another.ts, 0, 21)) |
| 46 | +>TMix : Symbol(TMix, Decl(another.ts, 0, 21)) |
| 47 | + |
| 48 | +const DisposableMixin = class { |
| 49 | +>DisposableMixin : Symbol(DisposableMixin, Decl(another.ts, 2, 5)) |
| 50 | + |
| 51 | + protected _onDispose() { |
| 52 | +>_onDispose : Symbol(DisposableMixin._onDispose, Decl(another.ts, 2, 31)) |
| 53 | + |
| 54 | + this._assertIsStripped() |
| 55 | +>this._assertIsStripped : Symbol(DisposableMixin._assertIsStripped, Decl(another.ts, 5, 5)) |
| 56 | +>this : Symbol(DisposableMixin, Decl(another.ts, 2, 23)) |
| 57 | +>_assertIsStripped : Symbol(DisposableMixin._assertIsStripped, Decl(another.ts, 5, 5)) |
| 58 | + } |
| 59 | + private _assertIsStripped() { |
| 60 | +>_assertIsStripped : Symbol(DisposableMixin._assertIsStripped, Decl(another.ts, 5, 5)) |
| 61 | + } |
| 62 | +}; |
| 63 | + |
| 64 | +export default class extends mix(DisposableMixin) { |
| 65 | +>mix : Symbol(mix, Decl(another.ts, 0, 0)) |
| 66 | +>DisposableMixin : Symbol(DisposableMixin, Decl(another.ts, 2, 5)) |
| 67 | + |
| 68 | + protected _onDispose() { |
| 69 | +>_onDispose : Symbol(default._onDispose, Decl(another.ts, 10, 51)) |
| 70 | + } |
| 71 | +} |
0 commit comments