Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic defaults #6354

Closed
wants to merge 3 commits into from
Closed

Conversation

RyanCavanaugh
Copy link
Member

A mostly-complete implementation for #2175

Not done yet:

  • Check that all defaults, when present, are identical
  • Check that defaults are assignable to constraints

/cc @ahejlsberg

let a4: HasDefault2;

/** Required may not follow optional */
interface Wrong<T, U = number> { }
Copy link
Contributor

Choose a reason for hiding this comment

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

not an error.

@mhegazy
Copy link
Contributor

mhegazy commented Sep 13, 2016

@RyanCavanaugh can you please refresh this PR?

let a4: HasDefault2;

/** Required may not follow optional */
interface Wrong<T, U = number> { }

Choose a reason for hiding this comment

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

Did you mean interface Wrong<T = number, U> {}?

@RyanCavanaugh
Copy link
Member Author

Superceded by #13487

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

4 participants