Skip to content

fix: resolve Symbol::For overload ambiguity - #1742

Open
umuoy1 wants to merge 1 commit into
nodejs:mainfrom
umuoy1:fix/symbol-for-overload-ambiguity
Open

fix: resolve Symbol::For overload ambiguity#1742
umuoy1 wants to merge 1 commit into
nodejs:mainfrom
umuoy1:fix/symbol-for-overload-ambiguity

Conversation

@umuoy1

@umuoy1 umuoy1 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Remove the std::string overload from Symbol::For to avoid ambiguity when a type is convertible to both std::string and std::string_view.

Calls with std::string arguments remain supported through implicit conversion to std::string_view.

Fixes #1741

Signed-off-by: umuoy1 <burningdian@gmail.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.65%. Comparing base (a815332) to head (9af66ff).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1742      +/-   ##
==========================================
- Coverage   63.69%   63.65%   -0.04%     
==========================================
  Files           3        3              
  Lines        2063     2061       -2     
  Branches      730      730              
==========================================
- Hits         1314     1312       -2     
  Misses        162      162              
  Partials      587      587              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Need Triage

Development

Successfully merging this pull request may close these issues.

Ambiguity on Symbol::For overload between std::string and std::string_view convertible

2 participants