From 76da69c6c6d6b72f0a5f3949434a1474a593c781 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Fri, 18 Sep 2015 10:56:40 -0700 Subject: [PATCH] Added failing fourslash test. --- ...edObjectLiteralMethodDeclarationParam01.ts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/cases/fourslash/contextuallyTypedObjectLiteralMethodDeclarationParam01.ts diff --git a/tests/cases/fourslash/contextuallyTypedObjectLiteralMethodDeclarationParam01.ts b/tests/cases/fourslash/contextuallyTypedObjectLiteralMethodDeclarationParam01.ts new file mode 100644 index 00000000000..6aabbbdbdce --- /dev/null +++ b/tests/cases/fourslash/contextuallyTypedObjectLiteralMethodDeclarationParam01.ts @@ -0,0 +1,32 @@ +/// + +// @noImplicitAny: true + +////interface A { +//// numProp: number; +////} +//// +////interface B { +//// strProp: string; +////} +//// +////interface Foo { +//// method1(arg: A): void; +//// method2(arg: B): void; +////} +//// +////function getFoo1(): Foo { +//// return { +//// method1(/*param1*/arg) { +//// arg.numProp = 10; +//// }, +//// method2(/*param2*/arg) { +//// arg.strProp = "hello"; +//// } +//// } +////} + +goTo.marker("param1"); +verify.quickInfoIs("(parameter) arg: A") +goTo.marker("param2"); +verify.quickInfoIs("(parameter) arg: B")