René's URL Explorer Experiment


Title: fix: wrap small integers before casting them to bool by SwastikTripathi · Pull Request #3065 · AssemblyScript/assemblyscript · GitHub

Open Graph Title: fix: wrap small integers before casting them to bool by SwastikTripathi · Pull Request #3065 · AssemblyScript/assemblyscript

X Title: fix: wrap small integers before casting them to bool by SwastikTripathi · Pull Request #3065 · AssemblyScript/assemblyscript

Description: Fixes #3057. Changes proposed in this pull request: An explicit cast of a small integer (i8, u8, i16, u16) to bool (x, x as bool, bool(x)) now clears the bits above the small type before testing the value. Before, convertExpression only wrapped small integers when converting to a larger type, and bool (size 1) never qualified, so a value that overflowed to 0 in its own type still tested as true: function f(a: u8): bool { let c: u8 = a + 1; return c; } f(255); // true before, false now (c is 0) The conditional form (c ? true : false) already went through makeIsTrueish, which wraps, so only the explicit cast was affected. Added cases to tests/compiler/bool.ts for u8, i8, u16 and i16 values that wrap to 0 (and some that don't). With the old compiler the module aborts on the first new assertion; with the fix it runs. Regenerated the bool and cast fixtures; cast.debug.wat changes because it contains such casts (an i32.and/sign-extension now precedes the i32.ne). npm run test:compiler passes. I've read the contributing guidelines I've added my name and email to the NOTICE file

Open Graph Description: Fixes #3057. Changes proposed in this pull request: An explicit cast of a small integer (i8, u8, i16, u16) to bool (<bool>x, x as bool, bool(x)) now clears the bits above the small type befor...

X Description: Fixes #3057. Changes proposed in this pull request: An explicit cast of a small integer (i8, u8, i16, u16) to bool (&lt;bool&gt;x, x as bool, bool(x)) now clears the bits above the small ty...

Opengraph URL: https://github.com/AssemblyScript/assemblyscript/pull/3065

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:15367d01-56e9-9a9a-7147-f802892ff43e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE9A2:A2351:17E727:218032:6B00558E
html-safe-nonce49707286581ab638eb9976fa8bfa661c54cb1d373dbb9f46650b0384ee51976d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOUEyOkEyMzUxOjE3RTcyNzoyMTgwMzI6NkIwMDU1OEUiLCJ2aXNpdG9yX2lkIjoiNzYyMDg1MjA4MTg5MjU0NTkzNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf8b58182b45034d07aa8405e9c3339b9aa3b0e5f5cdff52b7df5629c4b917bc7
hovercard-subject-tagpull_request:5277334078
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/AssemblyScript/assemblyscript/pull/3065/files
twitter:imagehttps://avatars.githubusercontent.com/u/88632085?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/88632085?s=400&v=4
og:image:altFixes #3057. Changes proposed in this pull request: An explicit cast of a small integer (i8, u8, i16, u16) to bool (<bool>x, x as bool, bool(x)) now clears the bits above the small type befor...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonef420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/AssemblyScript/assemblyscript git https://github.com/AssemblyScript/assemblyscript.git
octolytics-dimension-user_id28916798
octolytics-dimension-user_loginAssemblyScript
octolytics-dimension-repository_id105138356
octolytics-dimension-repository_nwoAssemblyScript/assemblyscript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id105138356
octolytics-dimension-repository_network_root_nwoAssemblyScript/assemblyscript
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release26e00df917aba0f128135dc073ea0c5e33a70d40
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/AssemblyScript/assemblyscript/pull/3065/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FAssemblyScript%2Fassemblyscript%2Fpull%2F3065%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FAssemblyScript%2Fassemblyscript%2Fpull%2F3065%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=AssemblyScript%2Fassemblyscript
Reloadhttps://github.com/AssemblyScript/assemblyscript/pull/3065/files
Reloadhttps://github.com/AssemblyScript/assemblyscript/pull/3065/files
Reloadhttps://github.com/AssemblyScript/assemblyscript/pull/3065/files
AssemblyScripthttps://github.com/AssemblyScript
assemblyscripthttps://github.com/AssemblyScript/assemblyscript
Codehttps://github.com/AssemblyScript/assemblyscript
Issues196 (196)https://github.com/AssemblyScript/assemblyscript/issues
Pull requests24 (24)https://github.com/AssemblyScript/assemblyscript/pulls
Actionshttps://github.com/AssemblyScript/assemblyscript/actions
Wikihttps://github.com/AssemblyScript/assemblyscript/wiki
Security and qualityhttps://github.com/AssemblyScript/assemblyscript/security
Insightshttps://github.com/AssemblyScript/assemblyscript/insights
Sign up for GitHub https://github.com/signup?return_to=%2FAssemblyScript%2Fassemblyscript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FAssemblyScript%2Fassemblyscript%2Fissues%2Fnew%2Fchoose
SwastikTripathihttps://github.com/SwastikTripathi
AssemblyScript:mainhttps://github.com/AssemblyScript/assemblyscript/tree/main
SwastikTripathi:fix/small-int-to-bool-casthttps://github.com/SwastikTripathi/assemblyscript/tree/fix/small-int-to-bool-cast
Conversation 0 https://github.com/AssemblyScript/assemblyscript/pull/3065
Commits 1 https://github.com/AssemblyScript/assemblyscript/pull/3065/commits
Checks 0 https://github.com/AssemblyScript/assemblyscript/pull/3065/checks
Files changed https://github.com/AssemblyScript/assemblyscript/pull/3065/files
Please reload this pagehttps://github.com/AssemblyScript/assemblyscript/pull/3065/files
fix: wrap small integers before casting them to bool https://github.com/AssemblyScript/assemblyscript/pull/3065/files#top
Show all changes 1 commit https://github.com/AssemblyScript/assemblyscript/pull/3065/files
b8fbb0c fix: wrap small integers before casting them to bool SwastikTripathi Nov 12, 2026 https://github.com/AssemblyScript/assemblyscript/pull/3065/commits/b8fbb0c445c0fce08a1db6841890a86d82474595
Clear filters https://github.com/AssemblyScript/assemblyscript/pull/3065/files
Please reload this pagehttps://github.com/AssemblyScript/assemblyscript/pull/3065/files
Please reload this pagehttps://github.com/AssemblyScript/assemblyscript/pull/3065/files
NOTICE https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-dfb14fbb9e7d095209ec4cfd621069437bf9c442ff9de9d4ce889781bd0fefcf
compiler.ts https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-041bb58b49fbc5e7fdf9b8d09f0f0ae8d524d727947bcfa3e3d1c91b8a35aeee
bool.debug.wat https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-a0bdcffaceb5f75db48da86f731e83c3d165260584e821a21b244a3143c1c6d8
bool.ts https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-e56fe20b386bbf59cdafd3d365657821280d97ddaefcbdb3dbd5c5f31b9fdfd3
cast.debug.wat https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-9d30129f591c74592eb24bd998409b19f2b1b041c6b2b00b8499fbc81dfe08d0
NOTICEhttps://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-dfb14fbb9e7d095209ec4cfd621069437bf9c442ff9de9d4ce889781bd0fefcf
View file https://github.com/AssemblyScript/assemblyscript/blob/b8fbb0c445c0fce08a1db6841890a86d82474595/NOTICE
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/AssemblyScript/assemblyscript/pull/3065/{{ revealButtonHref }}
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-dfb14fbb9e7d095209ec4cfd621069437bf9c442ff9de9d4ce889781bd0fefcf
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-dfb14fbb9e7d095209ec4cfd621069437bf9c442ff9de9d4ce889781bd0fefcf
src/compiler.tshttps://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-041bb58b49fbc5e7fdf9b8d09f0f0ae8d524d727947bcfa3e3d1c91b8a35aeee
View file https://github.com/AssemblyScript/assemblyscript/blob/b8fbb0c445c0fce08a1db6841890a86d82474595/src/compiler.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/AssemblyScript/assemblyscript/pull/3065/{{ revealButtonHref }}
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-041bb58b49fbc5e7fdf9b8d09f0f0ae8d524d727947bcfa3e3d1c91b8a35aeee
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-041bb58b49fbc5e7fdf9b8d09f0f0ae8d524d727947bcfa3e3d1c91b8a35aeee
tests/compiler/bool.debug.wathttps://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-a0bdcffaceb5f75db48da86f731e83c3d165260584e821a21b244a3143c1c6d8
View file https://github.com/AssemblyScript/assemblyscript/blob/b8fbb0c445c0fce08a1db6841890a86d82474595/tests/compiler/bool.debug.wat
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/AssemblyScript/assemblyscript/pull/3065/{{ revealButtonHref }}
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-a0bdcffaceb5f75db48da86f731e83c3d165260584e821a21b244a3143c1c6d8
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-a0bdcffaceb5f75db48da86f731e83c3d165260584e821a21b244a3143c1c6d8
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-a0bdcffaceb5f75db48da86f731e83c3d165260584e821a21b244a3143c1c6d8
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-a0bdcffaceb5f75db48da86f731e83c3d165260584e821a21b244a3143c1c6d8
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-a0bdcffaceb5f75db48da86f731e83c3d165260584e821a21b244a3143c1c6d8
tests/compiler/bool.tshttps://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-e56fe20b386bbf59cdafd3d365657821280d97ddaefcbdb3dbd5c5f31b9fdfd3
View file https://github.com/AssemblyScript/assemblyscript/blob/b8fbb0c445c0fce08a1db6841890a86d82474595/tests/compiler/bool.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/AssemblyScript/assemblyscript/pull/3065/{{ revealButtonHref }}
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-e56fe20b386bbf59cdafd3d365657821280d97ddaefcbdb3dbd5c5f31b9fdfd3
tests/compiler/cast.debug.wathttps://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-9d30129f591c74592eb24bd998409b19f2b1b041c6b2b00b8499fbc81dfe08d0
View file https://github.com/AssemblyScript/assemblyscript/blob/b8fbb0c445c0fce08a1db6841890a86d82474595/tests/compiler/cast.debug.wat
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/AssemblyScript/assemblyscript/pull/3065/{{ revealButtonHref }}
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-9d30129f591c74592eb24bd998409b19f2b1b041c6b2b00b8499fbc81dfe08d0
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-9d30129f591c74592eb24bd998409b19f2b1b041c6b2b00b8499fbc81dfe08d0
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-9d30129f591c74592eb24bd998409b19f2b1b041c6b2b00b8499fbc81dfe08d0
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-9d30129f591c74592eb24bd998409b19f2b1b041c6b2b00b8499fbc81dfe08d0
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-9d30129f591c74592eb24bd998409b19f2b1b041c6b2b00b8499fbc81dfe08d0
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-9d30129f591c74592eb24bd998409b19f2b1b041c6b2b00b8499fbc81dfe08d0
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-9d30129f591c74592eb24bd998409b19f2b1b041c6b2b00b8499fbc81dfe08d0
https://github.com/AssemblyScript/assemblyscript/pull/3065/files#diff-9d30129f591c74592eb24bd998409b19f2b1b041c6b2b00b8499fbc81dfe08d0
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.