2016-08-22 22:57:40 +02:00
|
|
|
/// <reference path='fourslash.ts'/>
|
|
|
|
|
2016-08-30 03:09:16 +02:00
|
|
|
// Should handle union and intersection types
|
2016-08-22 22:57:40 +02:00
|
|
|
|
2016-08-30 03:09:16 +02:00
|
|
|
//// interface BaseFoo {
|
2016-08-22 22:57:40 +02:00
|
|
|
//// hello(): void;
|
2016-08-30 03:09:16 +02:00
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// interface Foo extends BaseFoo {
|
2016-08-22 22:57:40 +02:00
|
|
|
//// aloha(): void;
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// interface Bar {
|
|
|
|
//// hello(): void;
|
|
|
|
//// goodbye(): void;
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// class FooImpl implements Foo {
|
2016-08-30 03:09:16 +02:00
|
|
|
//// [|hello() {/**FooImpl*/}|]
|
2016-08-22 22:57:40 +02:00
|
|
|
//// aloha() {}
|
|
|
|
//// }
|
|
|
|
////
|
2016-08-30 03:09:16 +02:00
|
|
|
//// class BaseFooImpl implements BaseFoo {
|
|
|
|
//// hello() {/**BaseFooImpl*/} // Should not show up
|
|
|
|
//// }
|
|
|
|
////
|
2016-08-22 22:57:40 +02:00
|
|
|
//// class BarImpl implements Bar {
|
2016-08-30 03:09:16 +02:00
|
|
|
//// [|hello() {/**BarImpl*/}|]
|
2016-08-22 22:57:40 +02:00
|
|
|
//// goodbye() {}
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// class FooAndBarImpl implements Foo, Bar {
|
|
|
|
//// [|hello() {/**FooAndBarImpl*/}|]
|
|
|
|
//// aloha() {}
|
|
|
|
//// goodbye() {}
|
|
|
|
//// }
|
|
|
|
////
|
2016-08-30 03:09:16 +02:00
|
|
|
//// function someFunction(x: Foo | Bar) {
|
|
|
|
//// x.he/*function_call0*/llo();
|
|
|
|
//// }
|
|
|
|
////
|
|
|
|
//// function anotherFunction(x: Foo & Bar) {
|
|
|
|
//// x.he/*function_call1*/llo();
|
2016-08-22 22:57:40 +02:00
|
|
|
//// }
|
|
|
|
|
2016-08-30 03:09:16 +02:00
|
|
|
for (var i = 0; i < 2; i++) {
|
2016-09-14 02:33:49 +02:00
|
|
|
verify.allRangesAppearInImplementationList("function_call" + i);
|
2016-08-30 03:09:16 +02:00
|
|
|
}
|