From 8aa56c1ccedb4070a8d6d8f3f703cd80b9841317 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Mon, 17 Oct 2016 09:12:15 -0700 Subject: [PATCH] Add fourslash test for contextually-typed `this` Regression test for #10972 --- tests/cases/fourslash/memberListOnContextualThis.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/cases/fourslash/memberListOnContextualThis.ts diff --git a/tests/cases/fourslash/memberListOnContextualThis.ts b/tests/cases/fourslash/memberListOnContextualThis.ts new file mode 100644 index 00000000000..7eeb67dc620 --- /dev/null +++ b/tests/cases/fourslash/memberListOnContextualThis.ts @@ -0,0 +1,12 @@ +/// +////interface A { +//// a: string; +////} +////declare function ctx(callback: (this: A) => string): string; +////ctx(function () { return th/*1*/is./*2*/a }); + +goTo.marker('1'); +verify.quickInfoIs("this: A"); +goTo.marker('2'); +verify.memberListContains('a', '(property) A.a: string'); +