Skip to content

Shared: Add elaborate QL doc to TypeInference.qll #19727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 12, 2025

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Jun 11, 2025

No description provided.

@hvitved hvitved marked this pull request as ready for review June 11, 2025 10:46
@Copilot Copilot AI review requested due to automatic review settings June 11, 2025 10:46
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Jun 11, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR expands the documentation in TypeInference.qll with detailed examples and descriptions of the two-phase initialization (Make1/Make2), the Matching and IsInstantiationOf modules, and usage patterns for the inferType predicate.

  • Added IsInstantiationOf to the phases overview.
  • Introduced multiple C#-style code examples illustrating base and recursive cases.
  • Expanded explanation of the Matching module usage for generic methods.
Comments suppressed due to low confidence (2)

shared/typeinference/codeql/typeinference/internal/TypeInference.qll:11

  • Grammar: add "to" after "is" so it reads "is to define a predicate".
* The intended use of this library is define a predicate

shared/typeinference/codeql/typeinference/internal/TypeInference.qll:94

  • Formatting: remove the stray " after path.isEmpty and add () to match other examples (i.e., path.isEmpty()).
*     // at argument position `0` is `int` with `path.isEmpty"`"

…ce.qll

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
geoffw0
geoffw0 previously approved these changes Jun 12, 2025
Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is super helpful, thank you.

…ce.qll

Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
@hvitved hvitved merged commit 70c3ae4 into github:main Jun 12, 2025
31 of 33 checks passed
@hvitved hvitved deleted the shared/type-inference-doc branch June 12, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants