fernando88to commented on PR #17:
URL: 
https://github.com/apache/grails-intellij-plugin/pull/17#issuecomment-5280078825

    All six threads are addressed now — 39697b7 and ebd3f85. Two things worth 
pulling out of the inline replies.
   
    **On the guard:** I kept it, for the reason you gave — the no-duplication 
property depends on both contributors sharing `CLASS_SOURCE`, and nothing 
enforces that. It's pinned now: contributions are
     counted through a bare `PsiScopeProcessor`, which does no deduplication, 
so the double contribution the guard prevents becomes visible. Removing the 
guard makes that one test fail with `expected:<1>
     but was:<2>` and leaves the other eight green — exactly the result you 
got, now with something in the suite that notices.
   
     **On projections — you pointed at the right place to dig, and it turned up 
more than missing coverage.** `getResultType0()` *is* reachable on a GORM 4+ 
classpath, but through one door only: the
     shorthand `def c = Ddd.createCriteria(); c { }` form, which resolves to 
the contributed `call` whose `List` return type sends 
`CriteriaReturnTypeCalculator` looking for the domain class and the
     projections block. The terminals `BuildableCriteria` declares itself don't 
get there, because the calculator only applies the projections logic to members 
`CriteriaBuilderImplicitMemberContributor`
     contributes and to `withCriteria`:
   
     | form | inferred type |
     |---|---|
     | `def c = ...; c { projections { countDistinct('aaa') } }` | 
`List<Integer>` |
     | `count { projections { ... } }` | `Integer` |
     | `list { projections { ... } }` | `Object` |
     | `get { projections { ... } }` | `Object` |
     | `list(max: 10) { projections { ... } }` | `Object` |
   
     This isn't a regression from the PR: before it, `list { }` on a GORM 4+ 
classpath already resolved (the interface declares it) and already typed as 
`Object`. It's a pre-existing gap in *return
     typing*, not resolution. I've pinned both the working path and the gap, 
the latter with a javadoc naming it a known limitation and pointing at the 
cause, so closing it later shows up as a diff.
   
     I deliberately didn't fix it here — it's a behaviour change in a different 
area from "`count` doesn't resolve", and it would want its own review. Happy to 
open a follow-up, or to fold it in if you'd
     rather have it in one go.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to