Skip to content

fixed show ArrayBuffer constructor as [Function: ArrayBuffer]#4935

Open
sahanaxzy wants to merge 1 commit intoboa-dev:mainfrom
sahanaxzy:fix-arraybuffer-display-format
Open

fixed show ArrayBuffer constructor as [Function: ArrayBuffer]#4935
sahanaxzy wants to merge 1 commit intoboa-dev:mainfrom
sahanaxzy:fix-arraybuffer-display-format

Conversation

@sahanaxzy
Copy link
Contributor

Summary

Fixes how constructors are shown in console/debug output so that only real class constructors use [class Name], while built-ins like ArrayBuffer use [Function: Name].

Solves #4934

Changes

Modified core/engine/src/value/display.rs

only shows [class Name] when the value is an OrdinaryFunction with is_class_constructor(); otherwise shows callables as [Function: Name].

Replace .map(...).unwrap_or(false) with .is_some_and(...) to satisfy Clippy.

@sahanaxzy sahanaxzy requested a review from a team as a code owner March 7, 2026 21:50
@github-actions
Copy link

github-actions bot commented Mar 7, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,963 52,963 0
Passed 49,687 49,687 0
Ignored 2,262 2,262 0
Failed 1,014 1,014 0
Panics 0 0 0
Conformance 93.81% 93.81% 0.00%

Tested main commit: b3d820369072123ded8defc927405b99b9012648
Tested PR commit: df98b4932c363b5347ef03b24378f4bc56d57555
Compare commits: b3d8203...df98b49

@codecov
Copy link

codecov bot commented Mar 7, 2026

Codecov Report

❌ Patch coverage is 29.41176% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.85%. Comparing base (6ddc2b4) to head (df98b49).
⚠️ Report is 775 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/value/display.rs 29.41% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4935       +/-   ##
===========================================
+ Coverage   47.24%   57.85%   +10.60%     
===========================================
  Files         476      556       +80     
  Lines       46892    60929    +14037     
===========================================
+ Hits        22154    35249    +13095     
- Misses      24738    25680      +942     

☔ View full report in Codecov by Sentry.
📢 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

None yet

Development

Successfully merging this pull request may close these issues.

1 participant