2016-08-22 22:57:40 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
|
|
|
// Should return method implementations in object literals within variable-like declarations
|
|
|
|
|
|
|
|
//// interface Foo {
|
|
|
|
//// he/*declaration*/llo: () => void
|
|
|
|
//// }
|
|
|
|
////
|
2018-05-31 22:32:02 +02:00
|
|
|
//// var bar: Foo = { [|hello|]: helloImpl };
|
|
|
|
//// var baz: Foo = { "[|hello|]": helloImpl };
|
2016-08-22 22:57:40 +02:00
|
|
|
////
|
|
|
|
//// function helloImpl () {}
|
|
|
|
////
|
2018-05-31 22:32:02 +02:00
|
|
|
//// function whatever(x: Foo = { [|hello|]() {/**1*/} }) {
|
2016-08-22 22:57:40 +02:00
|
|
|
//// x.he/*function_call*/llo()
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// class Bar {
|
2018-05-31 22:32:02 +02:00
|
|
|
//// x: Foo = { [|hello|]() {/*2*/} }
|
2016-08-22 22:57:40 +02:00
|
|
|
////
|
2018-05-31 22:32:02 +02:00
|
|
|
//// constructor(public f: Foo = { [|hello|]() {/**3*/} } ) {}
|
2016-08-22 22:57:40 +02:00
|
|
|
//// }
|
|
|
|
|
2016-09-14 02:33:49 +02:00
|
|
|
verify.allRangesAppearInImplementationList("function_call");
|
2017-01-26 20:02:08 +01:00
|
|
|
verify.allRangesAppearInImplementationList("declaration");
|