Skip to content

Add a compatibility overload#467

Merged
samhill303 merged 2 commits intomainfrom
sh/compat-overload
Feb 24, 2026
Merged

Add a compatibility overload#467
samhill303 merged 2 commits intomainfrom
sh/compat-overload

Conversation

@samhill303
Copy link
Collaborator

We removed the companion overloads because they were causing an ambiguous overload error if you named the tag.

This will break existing uses which add the tag without a named parameter Logger.i("tag") {"Message"} because the version of the function on the parent class has the throwable parameter first.

To avoid this break, this change adds back in a version of the function with tag as a first parameter, but gives it a different parameter name to avoid ambiguity

Base automatically changed from wp/update-samples to main February 24, 2026 14:13
We removed the companion overloads because they were causing an ambiguous overload error if you named the tag.

This will break existing uses which add the tag without a named parameter `Logger.i("tag") {"Message"}` because the version of the function on the parent class has the throwable parameter first.

To avoid this break, this change adds back in a version of the function with tag as a first parameter, but gives it a different parameter name to avoid ambiguity
@samhill303 samhill303 merged commit 86f9313 into main Feb 24, 2026
2 checks passed
@samhill303 samhill303 deleted the sh/compat-overload branch February 24, 2026 20:41
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