StrangeNoises commented on pull request #1601:
URL: https://github.com/apache/groovy/pull/1601#issuecomment-877622623


   Checked: Using the `TypeChooser` doesn't work for `MethodCallExpression` or 
`PropertyExpression`. Therefore left my version in for now.
   
   Reason appears to be that our `TypeChooser` is a `StatementMetaTypeChooser` 
and not, as you're presumably expecting because it looks like it might work, a 
`StaticTypesTypeChooser`.
   
   In turn, our `WriterController` is a plain base-class `WriterController` and 
not, again as you were presumably expecting, a `StaticTypesWriterController`.
   
   (Both logged with `getClass().toString()`, not `instanceof` seeing as in 
each case the `StaticTypes` variant is a subtype of the other.)
   
   This is when compiling the method `testVarargsOnlyTypeChecked` in 
`VarargsMethodTest.groovy`. That method is annotated 
`@groovy.transform.TypeChecked`, and the metadata is in place from earlier in 
the compilation process (that's how my code is working).
   
   I'll poke around and see if I can grok what's happening there, if it looks 
like a bug. Idly wondering if it's because only the method is annotated 
`@TypeChecked` and not the whole class... I wonder what else is quietly not 
working and not enough people are using it to notice. 😉
   
   Also as I understand it the `StaticInvocationWriter` is for `@CompileStatic` 
only. not `@TypeChecked` - could it be simply that the others are only used for 
that too? Deliberately or not...
   
   New push is just a forced rebase against upstream master, not that there's 
much new in the last week. I'm afraid I set that off before I actually 
identified the above.


-- 
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