Skip to content

[Tests] NFC: Add a couple of tests for parametrized opaque result types #72493

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

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Mar 21, 2024

No description provided.

@xedin
Copy link
Contributor Author

xedin commented Mar 21, 2024

@swift-ci please test


func test1() -> some P3<Int> { // expected-note {{opaque return type declared here}}
return G<S>()
// expected-error@-1 {{type of local function 'test1()' requires that 'S' conform to 'Int'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

do you want to fix the diagnostic to take requirement kind into account too? :) It seems it was hardcoded to RequirementKind::Conformance

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'll look into that!

@xedin
Copy link
Contributor Author

xedin commented Mar 25, 2024

I'll follow-up with a same-type diagnostic improvement today.

@xedin xedin merged commit 53a5b86 into swiftlang:main Mar 25, 2024
xedin added a commit to xedin/swift that referenced this pull request Mar 25, 2024
xedin added a commit to xedin/swift that referenced this pull request Mar 26, 2024
xedin added a commit to xedin/swift that referenced this pull request Mar 27, 2024
… opaque return type

Follow-up to swiftlang#72493

(cherry picked from commit 08e9382)
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.

2 participants