René's URL Explorer Experiment


Title: Type inference: Improve base type matching by hvitved · Pull Request #22761 · github/codeql · GitHub

Open Graph Title: Type inference: Improve base type matching by hvitved · Pull Request #22761 · github/codeql

X Title: Type inference: Improve base type matching by hvitved · Pull Request #22761 · github/codeql

Description: Before this PR, type information could only propagate backwards through sub typing when using type constraints (because that is the only form supported in Rust): class Base { init(_ b : B) { } } class Derived : Base<[D]> { } func foo>(_ value1: T1, _ base: T2) { } func bar(_ value1: T1, _ base: Base) { } foo([0], Derived([])) // works: can infer the element type of `[]` to be `Int` bar([0], Derived([])) // doesn't work: cannot infer the element type of `[]` to be `Int` This PR closes that gap, which is needed for proper handling of inherited constructors in Swift. DCA is uneventful for both Rust and Swift.

Open Graph Description: Before this PR, type information could only propagate backwards through sub typing when using type constraints (because that is the only form supported in Rust): class Base<B> { init(_ b : ...

X Description: Before this PR, type information could only propagate backwards through sub typing when using type constraints (because that is the only form supported in Rust): class Base&lt;B&gt; { ini...

Opengraph URL: https://github.com/github/codeql/pull/22761

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:38880e46-4a7d-35b3-dd61-05de3be92f17
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA294:7B817:14F98E7:1BC43B6:6AF89525
html-safe-nonce6c37ab2ef957608dd72f07fae78fb26082a62d3a896089738a8d6ea17ccb3ffe
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjk0OjdCODE3OjE0Rjk4RTc6MUJDNDNCNjo2QUY4OTUyNSIsInZpc2l0b3JfaWQiOiIyMDE2NTAxODU3NTI5NjY0ODA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac01a7cb79b07cae30d4bdda82f357f0aa139303b05205a501600639b48ca55f8e
hovercard-subject-tagpull_request:4759130717
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/github/codeql/pull/22761/files
twitter:imagehttps://avatars.githubusercontent.com/u/3667920?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3667920?s=400&v=4
og:image:altBefore this PR, type information could only propagate backwards through sub typing when using type constraints (because that is the only form supported in Rust): class Base<B> { init(_ b : ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codeql git https://github.com/github/codeql.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id143040428
octolytics-dimension-repository_nwogithub/codeql
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143040428
octolytics-dimension-repository_network_root_nwogithub/codeql
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
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/22761/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F22761%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%2Fgithub%2Fcodeql%2Fpull%2F22761%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=github%2Fcodeql
Reloadhttps://github.com/github/codeql/pull/22761/files
Reloadhttps://github.com/github/codeql/pull/22761/files
Reloadhttps://github.com/github/codeql/pull/22761/files
githubhttps://github.com/github
codeqlhttps://github.com/github/codeql
Codehttps://github.com/github/codeql
Issues1k (1k)https://github.com/github/codeql/issues
Pull requests516 (516)https://github.com/github/codeql/pulls
Discussionshttps://github.com/github/codeql/discussions
Actionshttps://github.com/github/codeql/actions
Projectshttps://github.com/github/codeql/projects
Security and qualityhttps://github.com/github/codeql/security
Insightshttps://github.com/github/codeql/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
hvitvedhttps://github.com/hvitved
github:mainhttps://github.com/github/codeql/tree/main
hvitved:type-inference-more-base-matchinghttps://github.com/hvitved/codeql/tree/type-inference-more-base-matching
Conversation 5 https://github.com/github/codeql/pull/22761
Commits 3 https://github.com/github/codeql/pull/22761/commits
Checks 22 https://github.com/github/codeql/pull/22761/checks
Findings https://github.com/github/codeql/pull/22761/findings
Files changed https://github.com/github/codeql/pull/22761/files
Please reload this pagehttps://github.com/github/codeql/pull/22761/files
Type inference: Improve base type matching https://github.com/github/codeql/pull/22761/files#top
Show all changes 3 commits https://github.com/github/codeql/pull/22761/files
72a00e3 Unified: More type inference tests hvitved Oct 6, 2026 https://github.com/github/codeql/pull/22761/commits/72a00e3c26b50f8ca00d97c709b43857e20c4485
70e4424 Unified: Type inference for empty array literals hvitved Oct 7, 2026 https://github.com/github/codeql/pull/22761/commits/70e4424a94c51e7f2c766e88c9a6bb5b630513d9
468caa3 Type inference: Improve base type matching hvitved Oct 6, 2026 https://github.com/github/codeql/pull/22761/commits/468caa3ba37def5992e656b62fa187fc07e61022
Clear filters https://github.com/github/codeql/pull/22761/files
Please reload this pagehttps://github.com/github/codeql/pull/22761/files
Please reload this pagehttps://github.com/github/codeql/pull/22761/files
TypeInference.qll https://github.com/github/codeql/pull/22761/files#diff-92b7348deb78d626ed9c382ed1eb2a6ab4b7291865006d0523ea460ef94bd1dd
FacadeAst.qll https://github.com/github/codeql/pull/22761/files#diff-0292aa52b25fbd97784e6a755850af414a0bee00eb0a3c09950cbc4638162250
TypeInference.qll https://github.com/github/codeql/pull/22761/files#diff-8e30b3e5a8931bde491c573be7ebc6d20907b9a18bd33d8efc33870aac199129
generics.swift https://github.com/github/codeql/pull/22761/files#diff-3f533e43100232212d2edb5c833119b184e86ed931462ccf2ee07762a2352561
type-inference.expected https://github.com/github/codeql/pull/22761/files#diff-02b02bc09eedb0c5781a24ab73c3822dfd7934fb919115ed3a1ab74f83afcd72
https://github.com/github/codeql/blob/main/CODEOWNERS#L25
shared/typeinference/codeql/typeinference/internal/TypeInference.qllhttps://github.com/github/codeql/pull/22761/files#diff-92b7348deb78d626ed9c382ed1eb2a6ab4b7291865006d0523ea460ef94bd1dd
View file https://github.com/hvitved/codeql/blob/468caa3ba37def5992e656b62fa187fc07e61022/shared/typeinference/codeql/typeinference/internal/TypeInference.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22761/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22761/files#diff-92b7348deb78d626ed9c382ed1eb2a6ab4b7291865006d0523ea460ef94bd1dd
https://github.com/github/codeql/pull/22761/files#diff-92b7348deb78d626ed9c382ed1eb2a6ab4b7291865006d0523ea460ef94bd1dd
https://github.com/github/codeql/pull/22761/files#diff-92b7348deb78d626ed9c382ed1eb2a6ab4b7291865006d0523ea460ef94bd1dd
https://github.com/github/codeql/pull/22761/files#diff-92b7348deb78d626ed9c382ed1eb2a6ab4b7291865006d0523ea460ef94bd1dd
https://github.com/github/codeql/blob/main/CODEOWNERS#L2
unified/ql/lib/codeql/unified/internal/FacadeAst.qllhttps://github.com/github/codeql/pull/22761/files#diff-0292aa52b25fbd97784e6a755850af414a0bee00eb0a3c09950cbc4638162250
View file https://github.com/hvitved/codeql/blob/468caa3ba37def5992e656b62fa187fc07e61022/unified/ql/lib/codeql/unified/internal/FacadeAst.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22761/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22761/files#diff-0292aa52b25fbd97784e6a755850af414a0bee00eb0a3c09950cbc4638162250
https://github.com/github/codeql/actions/runs/37639335511/job/112853802714?pr=22761
https://github.com/github/codeql/blob/main/CODEOWNERS#L2
unified/ql/lib/codeql/unified/internal/typeinference/TypeInference.qllhttps://github.com/github/codeql/pull/22761/files#diff-8e30b3e5a8931bde491c573be7ebc6d20907b9a18bd33d8efc33870aac199129
View file https://github.com/hvitved/codeql/blob/468caa3ba37def5992e656b62fa187fc07e61022/unified/ql/lib/codeql/unified/internal/typeinference/TypeInference.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22761/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22761/files#diff-8e30b3e5a8931bde491c573be7ebc6d20907b9a18bd33d8efc33870aac199129
https://github.com/github/codeql/pull/22761/files#diff-8e30b3e5a8931bde491c573be7ebc6d20907b9a18bd33d8efc33870aac199129
https://github.com/github/codeql/blob/main/CODEOWNERS#L2
unified/ql/test/library-tests/type-inference/generics.swifthttps://github.com/github/codeql/pull/22761/files#diff-3f533e43100232212d2edb5c833119b184e86ed931462ccf2ee07762a2352561
View file https://github.com/hvitved/codeql/blob/468caa3ba37def5992e656b62fa187fc07e61022/unified/ql/test/library-tests/type-inference/generics.swift
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22761/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22761/files#diff-3f533e43100232212d2edb5c833119b184e86ed931462ccf2ee07762a2352561
https://github.com/github/codeql/pull/22761/files#diff-3f533e43100232212d2edb5c833119b184e86ed931462ccf2ee07762a2352561
Please reload this pagehttps://github.com/github/codeql/pull/22761/files
Please reload this pagehttps://github.com/github/codeql/pull/22761/files
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.