diff --git a/tests/baselines/reference/superCallWithCommentEmit01.js b/tests/baselines/reference/superCallWithCommentEmit01.js new file mode 100644 index 00000000000..10f13b98879 --- /dev/null +++ b/tests/baselines/reference/superCallWithCommentEmit01.js @@ -0,0 +1,33 @@ +//// [superCallWithCommentEmit01.ts] +class A { + constructor(public text: string) { } +} + +class B extends A { + constructor(text: string) { + // this is subclass constructor + super(text) + } +} + +//// [superCallWithCommentEmit01.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var A = (function () { + function A(text) { + this.text = text; + } + return A; +}()); +var B = (function (_super) { + __extends(B, _super); + function B(text) { + return + // this is subclass constructor + _super.call(this, text) || this; + } + return B; +}(A)); diff --git a/tests/baselines/reference/superCallWithCommentEmit01.symbols b/tests/baselines/reference/superCallWithCommentEmit01.symbols new file mode 100644 index 00000000000..9476ee1c4e5 --- /dev/null +++ b/tests/baselines/reference/superCallWithCommentEmit01.symbols @@ -0,0 +1,21 @@ +=== tests/cases/compiler/superCallWithCommentEmit01.ts === +class A { +>A : Symbol(A, Decl(superCallWithCommentEmit01.ts, 0, 0)) + + constructor(public text: string) { } +>text : Symbol(A.text, Decl(superCallWithCommentEmit01.ts, 1, 16)) +} + +class B extends A { +>B : Symbol(B, Decl(superCallWithCommentEmit01.ts, 2, 1)) +>A : Symbol(A, Decl(superCallWithCommentEmit01.ts, 0, 0)) + + constructor(text: string) { +>text : Symbol(text, Decl(superCallWithCommentEmit01.ts, 5, 16)) + + // this is subclass constructor + super(text) +>super : Symbol(A, Decl(superCallWithCommentEmit01.ts, 0, 0)) +>text : Symbol(text, Decl(superCallWithCommentEmit01.ts, 5, 16)) + } +} diff --git a/tests/baselines/reference/superCallWithCommentEmit01.types b/tests/baselines/reference/superCallWithCommentEmit01.types new file mode 100644 index 00000000000..dfa0b1ce333 --- /dev/null +++ b/tests/baselines/reference/superCallWithCommentEmit01.types @@ -0,0 +1,22 @@ +=== tests/cases/compiler/superCallWithCommentEmit01.ts === +class A { +>A : A + + constructor(public text: string) { } +>text : string +} + +class B extends A { +>B : B +>A : A + + constructor(text: string) { +>text : string + + // this is subclass constructor + super(text) +>super(text) : void +>super : typeof A +>text : string + } +}