Odd "Cannot assign 'Type' to 'null'" Diagnostic

Hi,

In this Grails controller action closure, each of the method calls (the name and the arguments) are flagged with the error message "Cannot assign 'Clif' to 'null'" (pathLookup(...) and Clif.loadClif(...) both are declared to return type Clif):


If I change the local variable declaration from a "def" to "Clif" the diagnostics disappear. pathLookup() is not overloaded, Clif.loadClif(...) is.


Randall Schulz

0
Avatar
Permanently deleted user

Hello Randall,
this was the problem I was fighting during my last days at JetBrains. Unfortunately at that time I was unable to come up with any solution that wouldn't break anything. Now seems I know how this should look like, and in case my commit to the repository didn't break any tests (I don't currently have an access to build server), that I hope it won't, the bug may be considered fixed.

0

JIRA request please?

0

请先登录再写评论。