mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Also check inheritance for union and intersection types
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// Should handle intersection types
|
||||
// Should handle union and intersection types
|
||||
|
||||
//// interface Foo {
|
||||
//// interface BaseFoo {
|
||||
//// hello(): void;
|
||||
//// }
|
||||
////
|
||||
//// interface Foo extends BaseFoo {
|
||||
//// aloha(): void;
|
||||
//// }
|
||||
////
|
||||
@@ -13,12 +16,16 @@
|
||||
//// }
|
||||
////
|
||||
//// class FooImpl implements Foo {
|
||||
//// hello() {/**FooImpl*/}
|
||||
//// [|hello() {/**FooImpl*/}|]
|
||||
//// aloha() {}
|
||||
//// }
|
||||
////
|
||||
//// class BaseFooImpl implements BaseFoo {
|
||||
//// hello() {/**BaseFooImpl*/} // Should not show up
|
||||
//// }
|
||||
////
|
||||
//// class BarImpl implements Bar {
|
||||
//// hello() {/**BarImpl*/}
|
||||
//// [|hello() {/**BarImpl*/}|]
|
||||
//// goodbye() {}
|
||||
//// }
|
||||
////
|
||||
@@ -28,9 +35,15 @@
|
||||
//// goodbye() {}
|
||||
//// }
|
||||
////
|
||||
//// function someFunction(x: Foo & Bar) {
|
||||
//// x.he/*function_call*/llo();
|
||||
//// function someFunction(x: Foo | Bar) {
|
||||
//// x.he/*function_call0*/llo();
|
||||
//// }
|
||||
////
|
||||
//// function anotherFunction(x: Foo & Bar) {
|
||||
//// x.he/*function_call1*/llo();
|
||||
//// }
|
||||
|
||||
goTo.marker("function_call");
|
||||
verify.allRangesAppearInImplementationList();
|
||||
for (var i = 0; i < 2; i++) {
|
||||
goTo.marker("function_call" + i);
|
||||
verify.allRangesAppearInImplementationList();
|
||||
}
|
||||
|
||||
@@ -1,36 +1,12 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// Should handle union types
|
||||
|
||||
//// interface Foo {
|
||||
//// hello(): void;
|
||||
//// aloha(): void;
|
||||
//// }
|
||||
////
|
||||
//// interface Bar {
|
||||
//// hello(): void;
|
||||
//// goodbye(): void;
|
||||
//// }
|
||||
////
|
||||
//// class FooImpl implements Foo {
|
||||
//// [|hello() {/**FooImpl*/}|]
|
||||
//// aloha() {}
|
||||
//// }
|
||||
////
|
||||
//// class BarImpl implements Bar {
|
||||
//// [|hello() {/**BarImpl*/}|]
|
||||
//// goodbye() {}
|
||||
//// }
|
||||
////
|
||||
//// class FooAndBarImpl implements Foo, Bar {
|
||||
//// [|hello() {/**FooAndBarImpl*/}|]
|
||||
//// aloha() {}
|
||||
//// goodbye() {}
|
||||
//// }
|
||||
////
|
||||
//// function someFunction(x: Foo | Bar) {
|
||||
//// x.he/*function_call*/llo();
|
||||
//// }
|
||||
|
||||
goTo.marker("function_call");
|
||||
verify.allRangesAppearInImplementationList();
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// Should handle members of object literals in type assertion expressions
|
||||
|
||||
//// interface Foo {
|
||||
//// hel/*reference*/lo(): void;
|
||||
//// }
|
||||
////
|
||||
//// var x = <Foo> { [|hello: () => {}|] };
|
||||
//// var y = <Foo> (((({ [|hello: () => {}|] }))));
|
||||
goTo.marker("reference");
|
||||
verify.allRangesAppearInImplementationList();
|
||||
@@ -1,12 +0,0 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// Should handle members of object literals in type assertion expressions
|
||||
|
||||
//// interface Foo {
|
||||
//// hel/*reference*/lo(): void;
|
||||
//// }
|
||||
////
|
||||
//// var x = <Foo> { [|hello: () => {}|] };
|
||||
//// var y = <Foo> (((({ [|hello: () => {}|] }))));
|
||||
goTo.marker("reference");
|
||||
verify.allRangesAppearInImplementationList();
|
||||
Reference in New Issue
Block a user