eclipse-jdt / eclipse-jdt/eclipse.jdt.core

Casted receiver negation of `instanceof` completions

Open
#3,738 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

Consider completion at `|`:

```java
if (!(node instanceof MethodDeclaration) || node.getB|) {
System.out.println("Hello, World!");
}
```

I think it would be reasonable to suggest:

```java
if (!(node instanceof MethodDeclaration) || ((MethodDeclaration)node).getBody()|) {
System.out.println("Hello, World!");
}
```

I don't know how difficult this would be to implement.

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.