github / github/codeql

Statement encloses itself

Open
#3,707 2 comments 1 reaction 0 assignees View on GitHub
Java question
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

**Description of the issue**
It is possible for a `Stmt` to enclose itself.
Is this expected behavior? If yes, maybe add a note to the docs?

```codeql
import java

from Stmt s
where s.getEnclosingStmt() = s
select s
```
Link to query:
https://lgtm.com/query/4871075667428522469/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.