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

[SR-14254] Incorrect example #56614

Closed
swift-ci opened this issue Feb 18, 2021 · 3 comments
Closed

[SR-14254] Incorrect example #56614

swift-ci opened this issue Feb 18, 2021 · 3 comments
Labels
book Issues with The Swift Programming Language book bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. documentation transfer candidate The issue may belong in another repository

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Feb 18, 2021

Previous ID SR-14254
Radar rdar://problem/74616580
Original Reporter mgrynychyn (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, Documentation
Assignee None
Priority Medium

md5: 3e617c9256c72de7cf760b3f09a50b85

Issue Description:

There is an incorrect example in "Generics" part of Documentation, section "Type Constraints/Type Constraints Syntax"

The hypothetical function

func someFunction<T: SomeClass, U: SomeProtocol>(someT: T, someU: U) {
  // function body goes here
}

is not a generic function.

You can write

func someFunction (someT: SomeClass, someU: SomeProtocol) {
  // function body goes here
}

with the same results.

@typesanitizer
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AbhishekSharma55
Copy link

Hi there,

I want to contribute to this project and take on this issue as my first task. Could you please assign it to me? I am excited to work towards resolving it and will keep the team updated on my progress.

Thanks

@AnthonyLatsis AnthonyLatsis added transfer candidate The issue may belong in another repository book Issues with The Swift Programming Language book labels Mar 6, 2024
@AnthonyLatsis
Copy link
Collaborator

This is most certainly in reference to https://docs.swift.org/swift-book/documentation/the-swift-programming-language/generics#Type-Constraint-Syntax. I am not sure I understand what the issue was, but it looks to be fixed either way.

@xedin Please transfer this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
book Issues with The Swift Programming Language book bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. documentation transfer candidate The issue may belong in another repository
Projects
None yet
Development

No branches or pull requests

4 participants