apache / apache/grails-intellij-plugin
Problems with type inference in gsp file
- Dominant language
- Java
- Stars
- 17
- Forks
- 4
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 4
Description
Variable is specifically defined as enum `ProductEnum`, but IDEA considers it is `java.lang.CharSequence`
```
${product.title}
${wrongDep.join(", ")}
```
Both nightly and EAP are affected:
```
IntelliJ IDEA 2018.2 EAP (Ultimate Edition)
Build #IU-182.3588, built on July 4, 2018
IntelliJ IDEA EAP User
Expiration date: August 3, 2018
JRE: 1.8.0_152-release-1136-b23 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.5
```
```
IntelliJ IDEA 2018.2 EAP (Ultimate Edition)
Build #IU-182.3569.1, built on July 3, 2018
IntelliJ IDEA EAP User
Expiration date: August 2, 2018
JRE: 1.8.0_152-release-1136-b23 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.5
```
---
*Imported from [IDEA-195041](https://youtrack.jetbrains.com/issue/IDEA-195041) · Type: Bug · Votes: 0*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*
Contributor guide
No contributing guide indexed for this repository
Research direction
No repository file or test is named. Start by reproducing the provided GSP snippet in the listed IntelliJ IDEA builds and inspect how the type of `product` is inferred after the `g:set` cast. Done means the IDE recognizes `product` as `ProductEnum` and provides the expected type-aware behavior in the template.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100