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

.runtimeWarning reporter warnings appear at incorrect source location if caller provides an error #139

Open
Killectro opened this issue Nov 12, 2024 · 1 comment

Comments

@Killectro
Copy link
Contributor

Killectro commented Nov 12, 2024

If you call reportIssue("foo") you will see a runtime warning on the correct line because _RuntimeWarningReporter overrides reportIssue(_:) with @_transparent.

However, if you call reportIssue(MyError(), "foo") the purple warning will instead show up at IssueReporter.swift#L88 because _RuntimeWarningReporter utilizes the default implementation of the method which doesn't use the @_transparent attribute.

Version 1.4.2, Xcode 16.0, iOS simulator

image
@mbrandonw
Copy link
Member

Hi @Killectro, yeah this is just an oversight. Would you be willing to PR a fix?

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

No branches or pull requests

2 participants