René's URL Explorer Experiment


Title: C# 14: Null conditional assignment. by michaelnebel · Pull Request #21118 · github/codeql · GitHub

Open Graph Title: C# 14: Null conditional assignment. by michaelnebel · Pull Request #21118 · github/codeql

X Title: C# 14: Null conditional assignment. by michaelnebel · Pull Request #21118 · github/codeql

Description: In this PR we add tests for null conditional assignments. The null conditional assignments are supported out of the box by the extractor. As far as I can tell, we don't need to make any modifications to the guards library, the dereference logic or the nullness logic. However, it appears that conditional access has been overlooked in the MaybeNullExpr class in the Nullness module. This has been fixed.

Open Graph Description: In this PR we add tests for null conditional assignments. The null conditional assignments are supported out of the box by the extractor. As far as I can tell, we don't need to make any modific...

X Description: In this PR we add tests for null conditional assignments. The null conditional assignments are supported out of the box by the extractor. As far as I can tell, we don't need to make any mod...

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

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:31f271d7-b152-e1a3-121c-e7b01aa333e0
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA842:3E54B8:2B8A420:39F4D25:696F147C
html-safe-noncef0a8d019292e321157171ccca9400c2c38a6486b97239381b1ff2b924bb1aad2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODQyOjNFNTRCODoyQjhBNDIwOjM5RjREMjU6Njk2RjE0N0MiLCJ2aXNpdG9yX2lkIjoiNzg4OTcyOTYxODg1MDAyNjYyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac9f9478d4876ea36482e459ce69066fd5ffc2182662bde9ce5cf7175a2b716c8b
hovercard-subject-tagpull_request:3152792125
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/21118/files
twitter:imagehttps://avatars.githubusercontent.com/u/6472811?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/6472811?s=400&v=4
og:image:altIn this PR we add tests for null conditional assignments. The null conditional assignments are supported out of the box by the extractor. As far as I can tell, we don't need to make any modific...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee
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
release39aed5006635ab6f45e6b77d23e73b08a00272a3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F21118%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F21118%2Ffiles
Sign up https://patch-diff.githubusercontent.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://patch-diff.githubusercontent.com/github/codeql/pull/21118/files
Reloadhttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files
Reloadhttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files
github https://patch-diff.githubusercontent.com/github
codeqlhttps://patch-diff.githubusercontent.com/github/codeql
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fgithub%2Fcodeql
Fork 1.9k https://patch-diff.githubusercontent.com/login?return_to=%2Fgithub%2Fcodeql
Star 9.1k https://patch-diff.githubusercontent.com/login?return_to=%2Fgithub%2Fcodeql
Code https://patch-diff.githubusercontent.com/github/codeql
Issues 919 https://patch-diff.githubusercontent.com/github/codeql/issues
Pull requests 367 https://patch-diff.githubusercontent.com/github/codeql/pulls
Discussions https://patch-diff.githubusercontent.com/github/codeql/discussions
Actions https://patch-diff.githubusercontent.com/github/codeql/actions
Projects 0 https://patch-diff.githubusercontent.com/github/codeql/projects
Models https://patch-diff.githubusercontent.com/github/codeql/models
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/github/codeql/security
Please reload this pagehttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files
Insights https://patch-diff.githubusercontent.com/github/codeql/pulse
Code https://patch-diff.githubusercontent.com/github/codeql
Issues https://patch-diff.githubusercontent.com/github/codeql/issues
Pull requests https://patch-diff.githubusercontent.com/github/codeql/pulls
Discussions https://patch-diff.githubusercontent.com/github/codeql/discussions
Actions https://patch-diff.githubusercontent.com/github/codeql/actions
Projects https://patch-diff.githubusercontent.com/github/codeql/projects
Models https://patch-diff.githubusercontent.com/github/codeql/models
Security https://patch-diff.githubusercontent.com/github/codeql/security
Insights https://patch-diff.githubusercontent.com/github/codeql/pulse
Sign up for GitHub https://patch-diff.githubusercontent.com/signup?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://patch-diff.githubusercontent.com/login?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
michaelnebelhttps://patch-diff.githubusercontent.com/michaelnebel
github:mainhttps://patch-diff.githubusercontent.com/github/codeql/tree/main
michaelnebel:csharp14/nullconditionalassignmenthttps://patch-diff.githubusercontent.com/michaelnebel/codeql/tree/csharp14/nullconditionalassignment
Conversation 1 https://patch-diff.githubusercontent.com/github/codeql/pull/21118
Commits 4 https://patch-diff.githubusercontent.com/github/codeql/pull/21118/commits
Checks 16 https://patch-diff.githubusercontent.com/github/codeql/pull/21118/checks
Files changed 8 https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files
C# 14: Null conditional assignment. https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#top
Show all changes 4 commits https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files
f0d70f3 C#: Add null conditional tests. michaelnebel Jan 7, 2026 https://patch-diff.githubusercontent.com/github/codeql/pull/21118/commits/f0d70f337cf079958e2cacca509bf7051edde288
3d9c0cb C#: Take null conditional assignments into account in MaybeNullExpr. michaelnebel Jan 7, 2026 https://patch-diff.githubusercontent.com/github/codeql/pull/21118/commits/3d9c0cbb9b2f3d36f7d782b0b291d447eb31c9e2
8bb7ed4 C#: Update test expected output. michaelnebel Jan 7, 2026 https://patch-diff.githubusercontent.com/github/codeql/pull/21118/commits/8bb7ed4d58f6a69bcb960d781cfacc56796f6aa9
4723137 C#: Add change note. michaelnebel Jan 7, 2026 https://patch-diff.githubusercontent.com/github/codeql/pull/21118/commits/47231378de328433f7a99cc1dcc7b2a3ea5da2e1
Clear filters https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files
Please reload this pagehttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files
Please reload this pagehttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files
2026-01-06-null-conditional-assignments.md https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-c3b36eb3aa2263519d38e26c4a06b40108610abebd797c92f0bdd231943b6447
Nullness.qll https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-1e6b8b2bae62a628ed58db95450dc29f6ae07e3b0bbb93fad0dd714fd4d1ca71
NullConditional.cs https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-3b72dd08ef7cd977e9efe4e57ac547deae6677f7fa1a93281dff260cbd8d5003
maybenull.expected https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-eb52a574e83f058c9f663e581160ff2fbf709b898ce47f33feb78706a17b42d3
maybenull.ql https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-a6fdc12b31b47cf0bdda6bf57ac44786a48c2e99f92f0719278bae0d3a7e56b0
nullconditional.expected https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-502396af3a43f9e3a4e8c261584dbc93ea3fc1b1fd3dddd1ec1b25564a6ed721
nullconditional.ql https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-83e8e9bf2dc0b97d330093329e49ce74c686553809e391e3a90e5eb08dbd05b6
options https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-ec481f3f6d1a83679f00168911099f8969b45a124d86a61437c3e518988a27e4
https://patch-diff.githubusercontent.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/lib/change-notes/2026-01-06-null-conditional-assignments.mdhttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-c3b36eb3aa2263519d38e26c4a06b40108610abebd797c92f0bdd231943b6447
View file https://patch-diff.githubusercontent.com/michaelnebel/codeql/blob/47231378de328433f7a99cc1dcc7b2a3ea5da2e1/csharp/ql/lib/change-notes/2026-01-06-null-conditional-assignments.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/github/codeql/pull/21118/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/lib/semmle/code/csharp/dataflow/Nullness.qllhttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-1e6b8b2bae62a628ed58db95450dc29f6ae07e3b0bbb93fad0dd714fd4d1ca71
View file https://patch-diff.githubusercontent.com/michaelnebel/codeql/blob/47231378de328433f7a99cc1dcc7b2a3ea5da2e1/csharp/ql/lib/semmle/code/csharp/dataflow/Nullness.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/github/codeql/pull/21118/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-1e6b8b2bae62a628ed58db95450dc29f6ae07e3b0bbb93fad0dd714fd4d1ca71
https://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-1e6b8b2bae62a628ed58db95450dc29f6ae07e3b0bbb93fad0dd714fd4d1ca71
https://patch-diff.githubusercontent.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/test/library-tests/nullconditional/NullConditional.cshttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-3b72dd08ef7cd977e9efe4e57ac547deae6677f7fa1a93281dff260cbd8d5003
View file https://patch-diff.githubusercontent.com/michaelnebel/codeql/blob/47231378de328433f7a99cc1dcc7b2a3ea5da2e1/csharp/ql/test/library-tests/nullconditional/NullConditional.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/github/codeql/pull/21118/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/test/library-tests/nullconditional/maybenull.expectedhttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-eb52a574e83f058c9f663e581160ff2fbf709b898ce47f33feb78706a17b42d3
View file https://patch-diff.githubusercontent.com/michaelnebel/codeql/blob/47231378de328433f7a99cc1dcc7b2a3ea5da2e1/csharp/ql/test/library-tests/nullconditional/maybenull.expected
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/github/codeql/pull/21118/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/test/library-tests/nullconditional/maybenull.qlhttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-a6fdc12b31b47cf0bdda6bf57ac44786a48c2e99f92f0719278bae0d3a7e56b0
View file https://patch-diff.githubusercontent.com/michaelnebel/codeql/blob/47231378de328433f7a99cc1dcc7b2a3ea5da2e1/csharp/ql/test/library-tests/nullconditional/maybenull.ql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/github/codeql/pull/21118/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/test/library-tests/nullconditional/nullconditional.expectedhttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-502396af3a43f9e3a4e8c261584dbc93ea3fc1b1fd3dddd1ec1b25564a6ed721
View file https://patch-diff.githubusercontent.com/michaelnebel/codeql/blob/47231378de328433f7a99cc1dcc7b2a3ea5da2e1/csharp/ql/test/library-tests/nullconditional/nullconditional.expected
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/github/codeql/pull/21118/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/test/library-tests/nullconditional/nullconditional.qlhttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-83e8e9bf2dc0b97d330093329e49ce74c686553809e391e3a90e5eb08dbd05b6
View file https://patch-diff.githubusercontent.com/michaelnebel/codeql/blob/47231378de328433f7a99cc1dcc7b2a3ea5da2e1/csharp/ql/test/library-tests/nullconditional/nullconditional.ql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/github/codeql/pull/21118/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/github/codeql/blob/main/CODEOWNERS#L7
csharp/ql/test/library-tests/nullconditional/optionshttps://patch-diff.githubusercontent.com/github/codeql/pull/21118/files#diff-ec481f3f6d1a83679f00168911099f8969b45a124d86a61437c3e518988a27e4
View file https://patch-diff.githubusercontent.com/michaelnebel/codeql/blob/47231378de328433f7a99cc1dcc7b2a3ea5da2e1/csharp/ql/test/library-tests/nullconditional/options
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/github/codeql/pull/21118/{{ revealButtonHref }}
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.