Skip to content

Remove workaround for not being able to override generic method #1391

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

Closed
wants to merge 1 commit into from
Closed

Remove workaround for not being able to override generic method #1391

wants to merge 1 commit into from

Conversation

Nirma
Copy link
Contributor

@Nirma Nirma commented Feb 21, 2016

Remove workaround for not being able to override a generic method in a generic subclass.
Moved the implementation of the methods found in _ContiguousArrayStorage1 directly over to _ContiguousArrayStorage<Element> and removed _ContiguousArrayStorage1.

@gribozavr Thanks for pointing out this spot! How does it look?

@gribozavr
Copy link
Contributor

@swift-ci Please test

@gribozavr
Copy link
Contributor

@Nirma The patch looks good. Let's see what the CI says.

@Nirma
Copy link
Contributor Author

Nirma commented Feb 22, 2016

@gribozavr Sorry for that I pushed the fix, would you mind letting CI go again?

@gribozavr
Copy link
Contributor

@swift-ci Please test

@gribozavr
Copy link
Contributor

@Nirma OS X CI finished, could you take a look at the issues?

@Nirma
Copy link
Contributor Author

Nirma commented Feb 22, 2016

@gribozavr Thanks for kicking off the tests again, the previous override error is gone but the failure this time appears to be:
/home/buildnode/jenkins/workspace/swift-PR-Linux/swiftpm/Tests/Build/DescribeTests.swift:14:13: error: type 'DescribeTests' does not conform to protocol 'XCTestCaseProvider'

Is this related to this change?

@gribozavr
Copy link
Contributor

@Nirma No, swiftpm failure is unrelated (exists on master currently).

@gribozavr
Copy link
Contributor

@swift-ci Please test

@gribozavr
Copy link
Contributor

@Nirma Looks like there's a real OS X failure this time.

@Nirma
Copy link
Contributor Author

Nirma commented Feb 24, 2016

@gribozavr The generic syntax was off, sorry about that. How does it look now?

@gribozavr
Copy link
Contributor

@swift-ci Please test

}
return result
}

/// If `Element` is bridged verbatim, invoke `body` on an
/// `UnsafeBufferPointer` to the elements.
internal final override func _withVerbatimBridgedUnsafeBufferImpl(
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this function still override anything? Do we need to factor it as a separate function, or can we inline it into its only (as far as I can see) caller -- _withVerbatimBridgedUnsafeBuffer?

@Nirma
Copy link
Contributor Author

Nirma commented Feb 24, 2016

@gribozavr No it does not, so rather than just removing the override I can write it inline!

…a generic subclass.

Moved the implementation of the methods found in _ContiguousArrayStorage1 directly over to _ContiguousArrayStorage<Element>
@gribozavr
Copy link
Contributor

@swift-ci Please test

@gribozavr
Copy link
Contributor

@Nirma Seems like we have test failures on OS X.

@DougGregor
Copy link
Member

There are non-trivial failures to resolve here and the PR hasn't been updated in 20 days; closing out the stale PR.

@DougGregor DougGregor closed this Mar 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants