apache / apache/grails-intellij-plugin

Grails 2.5 project reports: 'Cannot infer argument types' error on generated controller

Open
#372 0 comments 0 reactions 0 assignees View on GitHub
bug imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

Reported at https://stackoverflow.com/questions/72201251/grails-auto-generated-code-is-with-warnings-and-errors

I am using Intellij IDEA Ultimate and have Grails plugin installed. When i auto generate, let's say controller i have warnings like so : "Cannot infer argument types " for this code :
```
multipartForm {
flash.message = message(code: 'default.created.message',
args: [message(code: 'tekEvent.label',
default: 'TekEvent'), tekEventInstance.id])//We need id to see in created message
redirect tekEventInstance //redirect will open show() view and populate it with instance's data
}
```
And an error for `'tekEvent.label'`.

Have MANY errors in generated views as well. It's not just me. My 3 fellows in team have the same problem as well. Would like to get a "Light" from you and pass it to them as well . Thanks ^_^[TekDays.zip](TekDays.zip)

---

*Imported from [IDEA-293898](https://youtrack.jetbrains.com/issue/IDEA-293898) · Type: Bug · Votes: 1*
*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

Start with the linked Stack Overflow report and the attached TekDays.zip, then reproduce the generated controller and views in IntelliJ IDEA Ultimate with the Grails plugin. Focus on the warnings around multipartForm and the error for tekEvent.label. Done means the Grails 2.5 project no longer reports these generated-code errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.