Skip to content
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

C#: Basic property pattern flow. #18781

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

michaelnebel
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the C# label Feb 14, 2025
@michaelnebel michaelnebel force-pushed the csharp/patternflow branch 3 times, most recently from c9ed986 to 1b68a4f Compare February 17, 2025 09:15
@michaelnebel michaelnebel changed the title C#: Pattern flow (Prototype) C#: Basic Pattern Flow. Feb 17, 2025
@michaelnebel michaelnebel changed the title C#: Basic Pattern Flow. C#: Basic property pattern flow. Feb 17, 2025
private predicate basicPattern(PatternExpr e) {
e instanceof VariablePatternExpr
or
not exists(VariablePatternExpr vpe | e.getAChild*() = vpe)

Check warning

Code scanning / CodeQL

Expression can be replaced with a cast Warning

The assignment to
vpe
in the exists(..) can replaced with an instanceof expression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant