René's URL Explorer Experiment


Title: Duplicated identifier used when mangle is enabled · Issue #1155 · terser/terser · GitHub

Open Graph Title: Duplicated identifier used when mangle is enabled · Issue #1155 · terser/terser

X Title: Duplicated identifier used when mangle is enabled · Issue #1155 · terser/terser

Description: Bug report Terser is using the same identifier for the function, and for the const defined inside the if. This produces code that can't be evaluated. Here is a simple reproduction case: function f1() { if (true) { function f2() { return ...

Open Graph Description: Bug report Terser is using the same identifier for the function, and for the const defined inside the if. This produces code that can't be evaluated. Here is a simple reproduction case: function f1...

X Description: Bug report Terser is using the same identifier for the function, and for the const defined inside the if. This produces code that can't be evaluated. Here is a simple reproduction case: functio...

Opengraph URL: https://github.com/terser/terser/issues/1155

X: @github

direct link

Domain: github-redirect.dependabot.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Duplicated identifier used when mangle is enabled","articleBody":"**Bug report**\r\n\r\nTerser is using the same identifier for the function, and for the const defined inside the if. This produces code that can't be evaluated.\r\n\r\nHere is a simple reproduction case:\r\n\r\n```js\r\nfunction f1() {\r\n\tif (true) {\r\n\t\tfunction f2() {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\r\n\t\tconst var1 = 666;\r\n\t}\r\n}\r\n```\r\n\r\nIf var1 is outside the \"if\", the correct identifier is used when minifying.\r\n\r\nUsed options:\r\n\r\n```js\r\n{\r\n  module: true,\r\n  compress: {\r\n    unused: false\r\n  }\r\n}\r\n```\r\n\r\n**Curent terser output**\r\n\r\n```js\r\nfunction n(){{function n(){return 1}const n=666}}\r\n```\r\n\r\nnote the inner function n() and the const n, they clash.","author":{"url":"https://github.com/renanccastro","@type":"Person","name":"renanccastro"},"datePublished":"2022-02-24T18:38:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1155/terser/issues/1155"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9922c1b5-2f27-1c36-1943-79a463b662f1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8FAC:1FDCF6:293D8BF:36F5155:6A655D52
html-safe-nonceddbede8f9f0088be9adddd5c3c50127b03f695ee050eaa0e3aa2ac2a48ccc02f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkFDOjFGRENGNjoyOTNEOEJGOjM2RjUxNTU6NkE2NTVENTIiLCJ2aXNpdG9yX2lkIjoiODI4MDE2NTEyODQ0MjU2ODAxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac854ace88427eb05ff618c33433ae477bbf7d643a786a5d45965dc68d044aed38
hovercard-subject-tagissue:1149621241
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/terser/terser/1155/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7ad04a8e54d47727ee2ad3756ccb57903ae5a165df7208f73ccbce0f5ddf9534/terser/terser/issues/1155
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7ad04a8e54d47727ee2ad3756ccb57903ae5a165df7208f73ccbce0f5ddf9534/terser/terser/issues/1155
og:image:altBug report Terser is using the same identifier for the function, and for the const defined inside the if. This produces code that can't be evaluated. Here is a simple reproduction case: function f1...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerenanccastro
hostnamegithub.com
expected-hostnamegithub.com
None52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b
turbo-cache-controlno-preview
go-importgithub.com/terser/terser git https://github.com/terser/terser.git
octolytics-dimension-user_id43502240
octolytics-dimension-user_loginterser
octolytics-dimension-repository_id29097127
octolytics-dimension-repository_nwoterser/terser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id29097127
octolytics-dimension-repository_network_root_nwoterser/terser
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release309153364422b3c499922d1a2a6404910a58ed8e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github-redirect.dependabot.com/terser/terser/issues/1155#start-of-content
https://github-redirect.dependabot.com/
Sign in https://github-redirect.dependabot.com/login?return_to=https%3A%2F%2Fgithub.com%2Fterser%2Fterser%2Fissues%2F1155
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github-redirect.dependabot.com/login?return_to=https%3A%2F%2Fgithub.com%2Fterser%2Fterser%2Fissues%2F1155
Sign up https://github-redirect.dependabot.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=terser%2Fterser
Reloadhttps://github-redirect.dependabot.com/terser/terser/issues/1155
Reloadhttps://github-redirect.dependabot.com/terser/terser/issues/1155
Reloadhttps://github-redirect.dependabot.com/terser/terser/issues/1155
Please reload this pagehttps://github-redirect.dependabot.com/terser/terser/issues/1155
terser https://github-redirect.dependabot.com/terser
terserhttps://github-redirect.dependabot.com/terser/terser
Please reload this pagehttps://github-redirect.dependabot.com/terser/terser/issues/1155
Notifications https://github-redirect.dependabot.com/login?return_to=%2Fterser%2Fterser
Fork 463 https://github-redirect.dependabot.com/login?return_to=%2Fterser%2Fterser
Star 9.3k https://github-redirect.dependabot.com/login?return_to=%2Fterser%2Fterser
Code https://github-redirect.dependabot.com/terser/terser
Issues 305 https://github-redirect.dependabot.com/terser/terser/issues
Pull requests 43 https://github-redirect.dependabot.com/terser/terser/pulls
Actions https://github-redirect.dependabot.com/terser/terser/actions
Projects https://github-redirect.dependabot.com/terser/terser/projects
Wiki https://github-redirect.dependabot.com/terser/terser/wiki
Security and quality 0 https://github-redirect.dependabot.com/terser/terser/security
Insights https://github-redirect.dependabot.com/terser/terser/pulse
Code https://github-redirect.dependabot.com/terser/terser
Issues https://github-redirect.dependabot.com/terser/terser/issues
Pull requests https://github-redirect.dependabot.com/terser/terser/pulls
Actions https://github-redirect.dependabot.com/terser/terser/actions
Projects https://github-redirect.dependabot.com/terser/terser/projects
Wiki https://github-redirect.dependabot.com/terser/terser/wiki
Security and quality https://github-redirect.dependabot.com/terser/terser/security
Insights https://github-redirect.dependabot.com/terser/terser/pulse
Duplicated identifier used when mangle is enabledhttps://github-redirect.dependabot.com/terser/terser/issues/1155#top
bughttps://github.com/terser/terser/issues?q=state%3Aopen%20label%3A%22bug%22
mangleIssue in the manglerhttps://github.com/terser/terser/issues?q=state%3Aopen%20label%3A%22mangle%22
https://github.com/renanccastro
renanccastrohttps://github.com/renanccastro
on Feb 24, 2022https://github.com/terser/terser/issues/1155#issue-1149621241
bughttps://github.com/terser/terser/issues?q=state%3Aopen%20label%3A%22bug%22
mangleIssue in the manglerhttps://github.com/terser/terser/issues?q=state%3Aopen%20label%3A%22mangle%22
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.