Skip to content

Only show first overload in a series of consecutive overload signatures#804

Merged
DanielRosenwasser merged 2 commits into
masterfrom
overwhelmedByOverloads
Oct 7, 2014
Merged

Only show first overload in a series of consecutive overload signatures#804
DanielRosenwasser merged 2 commits into
masterfrom
overwhelmedByOverloads

Conversation

@DanielRosenwasser
Copy link
Copy Markdown
Member

...for navigateTo.

Current semantics:

  • If an overload lacks an implementation, go to the first overload.
  • 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).

Comment thread src/services/services.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not walking the body of the function declaration this way, correct? If so we are missing inner functions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, this isn't finished, I was thinking about finishing this at home but I think I need to think out some of the semantics when dealing with incorrect code.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to get the first overload, not the last one. I think we should get the last one.

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).
Comment thread src/services/services.ts
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would pull the visit function out

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

👍

DanielRosenwasser added a commit that referenced this pull request Oct 7, 2014
Only show first overload in a series of consecutive overload signatures
@DanielRosenwasser DanielRosenwasser merged commit 39bcb10 into master Oct 7, 2014
@DanielRosenwasser DanielRosenwasser deleted the overwhelmedByOverloads branch October 7, 2014 22:34
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants