mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Finished up "overload collapsing" for navigate-to.
Current semantics: - If an overload lacks an implementation, go to the first implementation. - If an overload has any implementation, go to the first one. - If there are any declarations between an implementation and any overload, this will split the series of overloads (note that this is invalid code).
This commit is contained in:
+2
-2
@@ -24,6 +24,6 @@
|
||||
//// throw overload;
|
||||
////}
|
||||
|
||||
verify.navigationItemsListCount(1, "overload1", "exact");
|
||||
verify.navigationItemsListCount(2, "overload1", "exact");
|
||||
verify.navigationItemsListCount(2, "overload2", "exact");
|
||||
verify.navigationItemsListCount(3, "overload", "prefix");
|
||||
verify.navigationItemsListCount(4, "overload", "prefix");
|
||||
@@ -0,0 +1,23 @@
|
||||
/// <reference path="fourslash.ts"/>
|
||||
|
||||
////function overload1(a: string): boolean;
|
||||
////function overload1(b: boolean): boolean;
|
||||
////function overload1(x: any, b = (function overload() { return false })): boolean {
|
||||
//// throw overload1;
|
||||
////}
|
||||
////function overload1(b: number): boolean;
|
||||
////function overload1(f: typeof overload): boolean;
|
||||
|
||||
////function overload2(a: string): boolean;
|
||||
////function overload2(b: boolean): boolean;
|
||||
////function overload2(x: any, b = (function overload() { return false })): boolean {
|
||||
//// function overload2(): boolean;
|
||||
//// function overload2(x: any): boolean;
|
||||
//// throw overload2;
|
||||
////}
|
||||
////function overload2(b: number): boolean;
|
||||
////function overload2(f: typeof overload): boolean;
|
||||
|
||||
verify.navigationItemsListCount(1, "overload1", "exact");
|
||||
verify.navigationItemsListCount(3, "overload2", "exact");
|
||||
verify.navigationItemsListCount(4, "overload", "prefix");
|
||||
Reference in New Issue
Block a user