blackdrag commented on PR #3332: URL: https://github.com/apache/groovy/pull/3332#issuecomment-7317672234
But the problem is actually that `Sub1` or `Sub2` is taken as the receiver class for `pm()`, where it should be `Box`, even without flow typing. The type most general possible should be used for the bytecode level method call. If Sub1 and Sub2 each defined pm and not Sub or Box, then this should actually fail compilation. flow typing breaks with async code execution. So any usage in a closure cannot (initially) depend on the flow type. And any write in a closure "poisons" the flow type and makes it degrade to declarion type only - at least that is my opionion. -- 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]
