You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2021/06/22 11:45:03 UTC

[GitHub] [groovy] YueZhikong commented on pull request #1602: GROOVY-9999,GROOVY-8488:STC:make decimal literal parameter can auto c…

YueZhikong commented on pull request #1602:
URL: https://github.com/apache/groovy/pull/1602#issuecomment-865912864


   > For STC, there are a couple methods that check the compatibility of arguments and parameters or source and target types. I would expect a change in one of these to allow `BigDecimal` as argument to `double` parameter. I'm not sure of the reason for the change to make `BigDecimal` not convert as before. It would be good to understand why this stopped working at some point.
   > 
   > In terms of tests, we are slowly migrating away from `GroovyTestCase` and `GroovyShell#evaluate` in favor of JUnit 4 and `GroovyAssert#assertScript`. It appears you have taken us in the reverse direction.
   
   @eric-milles 
   Is the method "StaticTypeCheckingVisitor#findMethod" designed to "check the compatibility of arguments and parameters or source and target types"?
   
   That method returns empty mn in "StaticTypeCheckingVistor:3479",and causes "GROOVY-9999","GROOVY-8488". And my idea is to write a new method "StaticTypeCheckingVisitor#bigDecimalCast" to “check the compatibility”。 Maybe I should integrate the logic of "bigDecimalCast" into "findMethod"?
   
   And could you tell me all "methods that check the compatibility of arguments and parameters or source and target types"? That may help to solve GROOVY-8168 which is possible caused by similar method like "StaticTypeCheckingVisitorfindMethod".


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org